Thursday, November 17, 2011

Nov.17 + Dec. 19 Line Follower revisted

Dec.19 Note:
It was hoped this post would be finished when Line Follower apps were tested, but once again Forte with needed LMS FBs is too large. More coming after making forte.bin smaller.
Currently several forte Line Follower apps are finished waiting to be tested.
.
Nov.17
Line Follower app design notes
The first try at a Line Follower used GT= 2 point controller and then a  hysteresis.
.
The current try would like to try to automatically calibrate the light (off line) and dark (on line) following the line edge as suggested in A PID Controller For Lego Mindstorms Robots.
.
The approach is to use increasing better controllers:
  • 2 point controller via  F_GT FB.
  • Hysteresis since need UINT or INT must be created
  • PID 
The threadhold / setpoint has be calibrated and it  would be nice if it could adjust itself while running to handle lighting changes and shadows.
.
Open is how to find the set point.

Saturday, November 12, 2011

Nov.14 Comments in 4diac-ide

This entry is a start to review and try to make info seen consistent in 4diac-ide.


How can "things" be commented in 4diac-ide? Under properties. 

Which properties?  comment, description  misc> instance comment

Is there a consistent way to comment your own and see for existing "things"?
First:
What are all of the "things"?  Which properties do they use? Where are they seen?
  • System Configuration  
    • Device Instance
    • Resource 
      • description seen in Palette
        • (How do device and resources get added to this palette?)
    • Seen: 
      • Mapped To: .
      • Deployment under Resource selection  
    • Properties - Deployment  
      • next to Device Instance name 
      • Misc - Profile = Holobloc ?? never shown
  • Function blocks (FBs)
    • FB type name
      • Properties 
        • Comment 
          • seen - FB Palette if settings=details
          • often default value like "Basic Function Block"
        • Description
          • ?? never shown
    • In Application: mouse over both
      • FB instance name
      • FB type name
        • see:FB type name / System name/ Application name / mapped t
    • Interface 
      • events and data variables
        • Properties: comment 
          • seen - mouse over in application
      • event "with" data connections
        • seen - mouse over in application
  • Applications
    • FB instances
      • Properties: misc comment 
        • seen - mouse over in application
    • Connections between FBs
      • Properties:  misc comment 
        • seen - mouse over in application
    • Sub-applications
      • seen: mapped to
        • Notice not there like with FB
      • subapp window
        • FB instance name
        • Less info than FB in application without a subapp like no
          • Application name
          • FB type name
        • mapped to 
          • Notice not there like with FB

    Friday, November 11, 2011

    Nov.11 Binary counter

    A friend likes to use binary clock to interest and teach binary in elementary school. This app just counts up to 16 in binary. Seemed like a good finger / test exercise, but also shows the IEC61499 could be used to teach simple circuits.
    Full application, hopefully resembling simple circuits
    Same application using sub-apps:(dashed lines really solid)
    • FB_ADD, FB_XOR had to be added (to math.FBRT).  FB_OR and FB_NOT were added for completeness. Since the FBRT.jar has FB_ADD and 3 basic logic FBs and their interface matches the IEC61131 3. SelectionComparison.BitwiseBoolean FBs, (but not their names) only cloning these FBs was needed. 
    • This app could be used with LMS light sensors and forte, not just FBDK FBs and display on a PC.
    • To further test sub-applications, the application was grouped into sub-apps. This worked, but the tries that did not work are at the end.

    The same working application mapped and working:
    To work correctly sub-apps must be mapped both:
    1. inside each sub-app
    2. in application

    Sub-app funnies: 
    Notice the sysconf window. The connection to the init has to be the FB inside the Sub-App. Connections to cold/warm to subapp event is not allowed. But due to requiring both mapping the sub-app FBs show is no connections among each other. And on top is the regular app view with sub-app and connections.

    Previous try was worse. The sub-apps were just mapped inside the sub-apps, but not the application: (unmap inside the sub-app must be done 1 FB at a time.)

    First try, the sub-apps were only mapped inside the application. In sysconf the cold/warm connectors could not be connected to a subapp connector. (Screen shot did not capture the cursor with the forbidden circle with slash).


    Thursday, November 10, 2011

    Nov.10 fordiac tutorials

    Idea is to create tutorials that help those who know IEC 61499 standard get started with fordiac.
    The last 2 years hysteresis (FBDK IDE)  has been used with Masters level Elec.Eng. and touch on/off LED and flip-flop blinky with first semester Elec.Eng. (LMS with 4diac-IDE).


    First idea was hysteresis problem for those who know IEC 61499. However a minor detail was forgotten, this lab always used FBDK in the past. To use create new FBs with fordiac and use FBDK HMI in /out FBs means even the first applications have to be distributed. So this has been abandoned for the moment.


    Instead a tutorial which explains the existing application that comes with 4diac-ide was created:
    Getting Started: Using TestSystem supplied   (link on fordiac dev wiki main page)


    Flip-Flop tutorial to explain both fordiac and IEC 61499 application and FB development is in progress.

    • Flip-Flop Creating an application is ready to be tried.
    • Flip-Flop Application Structuring with Sub-Applications - has shown up some funnies / inconsistencies in the IDE. This needs to be tested with more current versions of the IDE
    • Flip-Flop Developing Function Blocks is in progress