Page 1
AUTOMATION & CONTROL INSTITUTEINSTITUT FÜR AUTOMATISIERUNGS-& REGELUNGSTECHNIK
Utilizing Lego Mindstorms nxt(tm) as Teaching and Training
Platform for IEC 61499
4DIAC Users’ WorkshopETFA, Bilbao, SpainSeptember 16, 2010
Alois [email protected]
Page 2
Lego Mindstorms nxt(tm) with 4DIAC 2September 16, 2010
Motivation
Inexpensive starting kits (~300€): Processor (Arm 7) 64kB Ram, 256kB Flash 3 Motors Sensors (color, 2 push-button, ultrasonic) ~600 Lego-Blocks
ECOS port available (open source real-time operating system)
FORTE port included on SourceForge
Page 3
Lego Mindstorms nxt(tm) with 4DIAC 3September 16, 2010
USB
ATMEL AT91 ISP/SAM-BA®
Vision
arm-elf-gcc
Applicationdownload
FBFB FBFB
Device specific Hardware & Operating System
Device
MAL = MARTE Abstraction Layer
Type-Library
Device Log
Interrupt-Handling Device I/O Memory
Remote-Resource (Firmware)
FB’s
Res.
Data
Conn.
E_RESTARTE_RESTART
External Event Manager
Event Chain Executor
Timer Network
Server_2_1Server_2_1 DEV_MGRDEV_MGR
E_SRE_SR
Device specific Hardware & Operating System
FORTE
FAL = FORTE Abstraction Layer
Type-Library
Device Log
Interrupt-Handling Device I/O Memory
Remote-Resource (Firmware) Resource 1 Resource n
SIFBSIFB
SIFBSIFB
SIFBSIFB
FBFB FBFB
FB’s
Res.
Data
Conn.
Event-Connections Data-ConnectionsFirmware or User FB’s
E_RESTARTE_RESTART
External Event Manager
Event Chain Executor
Timer Network
Server_2_1Server_2_1 DEV_MGRDEV_MGR
E_SRE_SR …
Resource 1 Resource n
SIFBSIFB
SIFBSIFB
SIFBSIFB
FBFB FBFB …
FORTEfirmware typefile generation
FB.h
.h /.cpp
FORTE source files /eCos
libraries
IEC 61499 Ethernet to USB
Converter
USB serial profile
forte.bin
Page 4
Lego Mindstorms nxt(tm) with 4DIAC 4September 16, 2010
Planned Training Scenarios
Typical applications in industrial automation Built on each other Increasing difficulty Deepening main IEC 61499 concepts Currently tutorials are
beeing developed
Page 5
Lego Mindstorms nxt(tm) with 4DIAC 5September 16, 2010
Tutorials Under Development
Light blinking application Goal: usage of sensors and actuators (light); understand
application timing
Line following robot Goal: understand Basic Function Blocks; Closed Loop Control
(Motors); Management of resources
Car Wash Goal: develop Service Interface Function Blocks; Improved
Closed Loop Control (e.g., PID)
Part Sorting and Packaging Goal: timed buffers; Position control (Pick and Place);
Monitoring of conveyor belt
Page 6
Lego Mindstorms nxt(tm) with 4DIAC 6September 16, 2010
Current State
FORTE runs on Lego Controller 4DIAC-IDE can download via
Java-proxy and USB FBs for
Push-Sensor Buttons LED / Light-Sensor Sound Sensor Motors
Needs JTAG connector for debugging voids guarantee
Page 7
Lego Mindstorms nxt(tm) with 4DIAC 7September 16, 2010
Example Line Following Robot
Page 8
Lego Mindstorms nxt(tm) with 4DIAC 8September 16, 2010
Next Steps
Develop FBs for Ultra-sonic sensor Display Sound
Testing and improvements Work without JTAG Use binary XML for improving performance and memory
usage
Will be released to public via 4DIAC-Wiki: http://sourceforge.net/apps/mediawiki/fordiac
Additional tutorials, examples and suggestions are warmly welcome
Page 9
Lego Mindstorms nxt(tm) with 4DIAC 9September 16, 2010
Further Developments
Utilizing Lego’s Bluetooth for distributed applications
Connecting 4DIAC with Virtual Lego