Embedded Motion Control/Additional information: Difference between revisions

From Control Systems Technology Group
Jump to navigation Jump to search
(Created page with '==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 ske…')
 
Line 4: Line 4:
*Make a clear distinction between the sample rates of the different software parts and thoroughly consider on which RCX they are implemented.
*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.
*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 <code>Makefile</code> is present, i.e. <code>/brickos-0.9.0/marslander</code>.
*In order to compile the written C-programs into .lx-files, all C-code should be put into the directory where the <code>Makefile</code> is present, i.e. <code>~/emc/demo</code>.
*To prevent the system from crashing it is necessary to insert a stop thread in the program in which all other threads are killed.
*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 <code>while(1)</code>, use <code>while(!shutdown_requested())</code> instead.
*Avoid the use of <code>while(1)</code>, use <code>while(!shutdown_requested())</code> instead.
*Make sure that variables do not overflow, for example keep an integer smaller than 32767 (see [1, page 187])
*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.
*The lake may not be visible when standing right in front of it.
*To get wireless inter at the TU/e go [[Realtime_Linux#Wireless_internet_at_the_TU.2Fe | here]]

Revision as of 11:48, 21 March 2011

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 inter at the TU/e go here