Tuesday, March 9, 2010

Mar.9 4diac UI Notes

In  4DIAC :
To move the connectors so more readable:
  Extras / Preferences Default Router drop-down: Adjustable Router
  then when a connector is clicked on, a point is available for adjusting the location.
Sub-application in 4diac: rt click / new sub-application
Interface allows only the actual inputs/outputs used to show by  unchecking the other events & variables.

[switching to math for the rest of the week]

Monday, March 8, 2010

*Tutorial 3: Assembly line Notes

Idea:
Presence Sensor (light, distance,..) tells a color sensor something is coming in x ms 
Color Sensor application tells the Reject application if something is coming in x ms.

Need a buffer between sensor applications.

Mar.8 Line Follower Designs

Common Designs:
  • OO sequential - in for loop read light sensor and react to state
  • behavior programming - an arbitrator checks in priority order defined behaviors, if their condition is true. The first behavior with a true condition is performed.  Ex: Online? go forward
Behavior programming seems to fit into the design patterns:
  • observer pattern
  • publish/subscribe pattern
which is used in 4DIAC network pallete as implemented by FBDK.
Background Info: Design Patterns in the IEC 61499 Architecture 

Sunday, March 7, 2010

Mar.8 IEC 61499 Overview notes

IEC61499 (notes for an overview for tutorial)  
(notes from:    Want to switch Lewis quotes to quotes from offical standand - if understandable)
-L= Lewis : Modelling control systems using IEC 61499, pp.22-
- 4DIAC 
)
FB = Function Block 
Main focus: model the behaviour of FBs within each resource.p.24 L
  • System Model "defines the relationship between communicating devices and applications." p.22 L
    • has application(s)
    • has device(s)
  • Device Model
    • has resource(s) (similiar to 61131-3)
    • "load and unloads distributed applications without disturbing existing applications" via management services
    • "has a process interface to exchange data via external networks with resources in remote devices." p.23 L
    • has a communication interface(outside of 61499) that provides communications services for resources to exchange data via external networks with resources in remote devices." p.23 L
    • has fragments of FB networks
  • Resource Model - "provides facilities and services to support the execution of one or more FBs application fragments."p.24 L
    • provides interfaces via Service Interface (SI) FBs
      •  to the communications systems (in 4DIAC FBs in netwk palette)
      •  to the 'device specific processes'."p.24 L (via SI FBs)
    •  supports independent operation It can be: loaded, configured, started, stopped L p.24
    •  [coordination of (different) resources when starting an application not yet addressed] L p.24
  •  Application Model - a network of interconnect FBs, linked by events and data flows.L p.25
    • can be fragmented and distributed over many resources (what is "fragmented"? into FBs?)
    • can have sub-applications (are they supported in 4DIAC?) 
  • Function Block
    • "allocated to a resource with interconnected devices."p.24 Lewis book
    • has in / out 
      • events and 
      • data
    • Types 4diac
      • Simple (? - not supported in 4diac)
      • Basic
      • Composite
      • Service Interface (SI) "provide a link between FBs and resource interfaces"L p.24 in 4DIAC via code added to the C++ code generated from the 61499 XML.
      • Adapter (? - not supported in 4diac)
Differences btw. 61131-3 and 61499
  • Platforms and tools can't interoperate 4DIAC_Initiative.pdf p.5

Friday, March 5, 2010

Mar.5 for loop in IEC 61499

FB experiments: for loop in IEC 61499



Wednesday, March 3, 2010

Mar. 4 Wiki start and Line Follower Simulator

Line Follower 
dual-motor-bot construction instructions

Wiki:
Changed Logo to new hopefully better quality logo.
Added basic / linefollower construction links 
*LEGO NXT Robot construction links entry made this very easy
Blog documentation is making creating the actual tutorial easier


Line Follower Simulator
Averaging of just one "color"  (black) of light calibrator. This needs to be split up into a setPort and calibrate1Color FBs.



Open Question
If QI=1 then execute FB, 
else 
QI=0 ignore EVENTS
Where is this documented? 
In book QI/QO are input/output status. 

Mar.3 Line Follower Simulation start

The line follower uses only 1 device, so it should able to be modeled as 1 device. The simulated model will use different types of FBs. Basic and composite FBs must be added to some IEC 61499 RTE. The choices are FORTE or FBRT. Since the HMI FBs used for simulation are FBRT, if FORTE is used, then PUBLISH and SUBSCRIBE FBs must be used. This causes unnecessary complexity sending events between FBs on the 2 "devices". 

So the simulation will develop the application and FB types in 4DIAC, but will add the FBs to FBRT for now. Simulation testing will also be done via 4DIAC. Since the FBs use Structured Text FORTE, they can also be used  for the real (ST) Lego Line Follower under eCos  without changes, except for direct Lego HW  I/O (Sensors, Motors, possibly the Display). Only FORTE will be running under eCos. So the real Lego line follower will need/use FORTE.


Simulation:
  1. 4DIAC: Develop Application and FB Types
  2. FBDK editor parse: Check for basic and composite FB errors    
    (no Structured Text error checks currently in 4DIAC?)
  3. FBDK editor save as: 
    • Converts the updated XML to Java class (fb.rt.fbTypeGroupName)
    • Compiles to Java classes in FBDK
  4. 4DIAC: Add fbTypeGroupName to FBRT preferences
  5. 4DIAC: Add new FBs where needed in application
  6. 4DIAC: Test via Deployment of FBRT in 4DIAC