Sunday, November 26, 2017

MyTraffic Light

This app is to create Trafic app for BBB on the RPi.
see Traffic control example running on a Beagle Bone Black for background.
Breadboard Wiring

Wiring to RPi












RPi wiring
Traffic light (Red,Yellow,Green= (pins 11,13,15) = (GPIO 17,13, 22)
Pedestrian (Red,           ,Green= (pins12,    ,16)  = (GPIO 12,    ,23)

  • Connect LED+ to a GPIO pin on the RPi
  • Connect LED- to resistor (used 330 Ohms)
  • Connect resistors to breadboard negative line,
  • which should be connected to a ground pin on RPi (used pin 6=GND)

Trafic system

Click on System and then on the  Virtual DNS tab at bottom and all variables, like %SCADA_Enable%,  and their values appear :)

Saturday, November 25, 2017

Blinky on Raspberry Pi

Test Environment and other requirements
  • Used mobile phone to create a network with 2 nodes. Interesting since no longer just using localhost.
  • ipconfig (windows) and ifconfig (raspbian)  identified the net ip address to use for the respective devices.
  • GPIO pin #s are used as expected like other SysFs RPi examples
  • Start forte on the Raspberry Pi as follows. It requires sudo to work and of course the ip addr:port as input
    • cd to directory with the forte executable:
    • sudo ./forte -c :61499
  • When using Publish and Subscribe use multicast IP addresses with unique ports.
    • See  FBDK/IP in 4diac documentation for more details.

Test Apps
Needed to use step-wise refinement to be sure the parts worked.
App1: LEDon Turn RPi led on
Tested: (RPI only)
*if the communication from 4diac-IDE to RPi worked
*if pin numbering is GPIO numbering
*simple sysFS communication test
App2: LEDauto : Blink RPi led
Tested:  (RPI only) Using sysFS more
App3ALEDstart_Stop:  (added RPI > status to PC) Blink RPi led and reflect in FBRT WINDOW via BOOL_OUT with a PC "led" 
Tested: Publish / Subscribe to PC from RPi
App3B: LEDstart_Stop:  (added PC control of RPi) Via Start and Stop buttons on PC in a FBRT_WINDOW control starting and stopping the blinking of the RPI led and the PC "led" to reflect RPi activity 
Tested: Publish / Subscribe to RPi from PC  to control RPi

LED test app Win10

[Some apps and links in older posts no longer exist, so screen shots so not lost.]

Idea is an app where the LED specifics can be mapped to different devices.

Since the LED specific parameters and interfaces are different, this is not a true build once run anywhere. This will be addressed in later post where a wrapper will hide the differences and  limitations that come from hiding the differences will discussed.

PC LED Test App from current (Nov.2017) with LED added via FBDK > HMI > OUT_BOOL FB
Also needed to add for connection between devices a Publish E_SR Q output  (FORTE_PC) to OUT_BOOL FB IN (FBDK_WINDOW) via Subscribe.


System Configuration

Devices are both on PC, but running different IEC61499 tools.

Application (Distributed)

.

Connections between devices

FBDT_WINDOW.PANEL_RESOURCE


FORTE_PC.EMB_RESOURCE     (EMB=embedded)

APP Deployed

Press START button and led1 alternates between black and red.


Tuesday, November 14, 2017

O/S and HW to run 4DIAC

As 4DIAC gets better, most O/S environments work with pre-compiled exe    

O/S currently:
  • Windows: Virtual Studio set-up is easier because Eclipse set-up uses cygwin, whose set-up is harder.  Majority of 4DIAC downloads are still from Windows.
  • Linux: Flavor used doesn't matter, Debian, Raspbian, Ubuntu, Cent OS etc. etc. Most documentation using Debian based packaging command. Favored by 4DIAC developers.
  • Mac (CACAO): Similar to Linux, but don't know anyone personally using, but often used by developers.
4DIAC Hardware comparison for hobbyist or a class:
  • Raspberry Pi models,  Several Raspberry Pi models supported and used in examples and real apps.
  • Beagle Board models, 4DIAC Trafic example uses Beagle Bone Black
  • Or donated HW 

Monday, November 13, 2017

Current 4DIAC class set-ups

(My current understand of )
These are the current 4DIAC class set-ups:

1. TU Wien Seminar

  • HW: Beckhoff?

2. Demos
  • HW - Beagle Bone (Black)
  • O/S - Debian
  • Demo app(s) - traffic light
  • Location - Off-site at conference or business
3. Demo - Hardware specific
  • HW - Company specific
  • O/S - Debian
  • Demo app(s) - ?
  • Location - Off-site at conference or business