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).


No comments:

Post a Comment