Embedded Motion Control/Additional information

From Control Systems Technology Group
Jump to navigation Jump to search

Tips and tricks

  • When experimenting with the additional mars-rovers, the RCX from the experimental kit can be used to fulfil the role of the earth computer.
  • First make a sketch of the software architecture on paper before writing the actual code.
  • Make a clear distinction between the sample rates of the different software parts and thoroughly consider on which RCX they are implemented.
  • If operations fail, printing error code to the LCD can help to debug the program.
  • In order to compile the written C-programs into .lx-files, all C-code should be put into the directory where the Makefile is present, i.e. ~/emc/demo.
  • To prevent the system from crashing it is necessary to insert a stop thread in the program in which all other threads are killed.
  • Avoid the use of while(1), use while(!shutdown_requested()) instead.
  • Make sure that variables do not overflow, for example keep an integer smaller than 32767 (see [1, page 187])
  • The lake may not be visible when standing right in front of it.
  • To get wireless internet at the TU/e go here
  • Dropbox is a nice application/service to share the code.
  • Please make sure that when booting ubuntu from a usb-drive, you do NOT put the system on standby or hibernate! There have been several persons for whom this led to an un-bootable ubuntu drive.

Common Issues

Please add any more known issues to this list!

  • My brick doesn't behave as expected / hangs / or won't stop
    • Shutdown the brick by taking one of it's batteries out. Press the on/off button once to make sure the power is lost and put the battery back in again. Now you have to reload the firmware and improve your programming skills ;)
  • Uploading new firmware fails every time
    • Before uploading new firmware, take out one of the batteries. Press the on/off button once to make sure the power is lost and put the battery back in again. Now you have to reload the firmware.
  • When running my program, the man starts running but the program does nothing at all. When pressing run again the brick stops, but my program does nothing.
    • This probably has to do something with the memory of the brick. Especially when one or more large programs are present on the brick, this symptom occurs. When testing larger programs, make sure to use only one program slot and overwrite your program every time.
  • When trying to upload a program, the infrared icon flashes fast and the upload fails
    • Make sure there is no direct sunlight shining into the brick and/or tower. Also try switching the brick on and off and start uploading again.


Application Programming Interface

The API can be downloaded here

Building plan

The building plan can be downloaded here

Lecture slides / Workshops

EMC_Workshop_Sense_And_Act.pdf
EMC_Workshop_Lets_Talk.pdf
EMC_Course_Multitasking_Synchronisation.pdf