Summary
This chapter has been an orientation for undertaking the rest of the tasks in this book. The following points summarize the discussion:
- Our objective is to learn the fundamentals of real-time computing by implementing the digital control of a mechatronic system.
- As a learning platform, our growing understanding will be applied to a real-time target system (T1) via a development system (D1).
- The real-time target system is comprised of a real-time target computer, an electromechanical subsystem, and a user interface (UI) subsystem, along with prototyping hardware.
- The real-time development system, which we will use to program the target computer, is a PC with a VM and the Eclipse IDE. The IDE includes a debugger that allows us to trace a program’s execution.
- Processors execute instructions, and a program is a sequence of instructions.
- A memory address is an index for memory, which is different than but corresponds to its contents.
- Computer languages can be considered on a spectrum from low to high level. A program is stored in memory in (the lowest-level) machine language, which processors understand. Assembly language is a slightly more descriptive form of a program, which is translated into machine language via an assembler. Programming languages are high level and are processor independent. Compilers and interpreters convert programming languages into machine code. A linker generates executable files that a loader can queue up for execution.
- The C programming language is the lingua franca of real-time computing because it is small, fast, and efficient.
- Elements of a C program include literals, constants, variables, expressions, statements, and functions. It is important to use good programming style.
- Some C data types include
char
,int
, anddouble
. Arrays of the various data types can be formed. - C control-flow statements include
if
/else
/else if
statements,switch
/case
statements,for
andwhile
loops, and the attendantbreak
andcontinue
. - The myRIO C library contains functions and data types for interacting with myRIO I/O. The primary header file for the library is MyRio.h.
- The T1 C library has additional functions that facilitate the programming of the T1 target system. The primary header file for the library is T1.h.
Online Resources for Section 0.7
No online resources.