Overview of the FlexMotion architecture


This document contains a brief overview of FlexMotion, and describes its different components.


Overview of communication between the FlexMotion application and board

The following image shows how FlexMotion programs communicate with the FlexMotion board:

Overview of communication between RTOS and motors

The basic components of a motion controller fall into three categories:

  1. Supervisory control -- Does all the command sequencing and coordination
  2. Trajectory generator -- Generates the motion profile on the fly (multi-axes)
  3. Control loop -- Does the fast, closed-loop control with position, velocity, and trajectory maintenance on multiple axes simultaneously

The following image shows the motion controller components and how they interact:

The four FlexMotion components

The FlexMotion board includes the following four components:

  1. The 68331 microprocessor -- A 32-bit microprocessor
  2. The DSP -- The 2111 fixed-point DSP (2185 on the 7344 boards) from Analog Devices
  3. The FPGAs -- The FPGAs implement the quadrature encoder and stepper pulse generator (in the case of FlexMotion-6C, a zilog is used for the stepper pulse generator)
  4. Motion I/O -- I/O dedicated for motion such as limits, home switches, breakpoints, and high-speed capture

The following image shows the interaction of the different FlexMotion components:

Details on the FlexMotion components

The following sections describe the FlexMotion components in more detail.

The 68331 Microprocessor 
The 68331 microprocessor has the following functions:

  • Runs the RTXC real-time OS
  • Handles all bus communication (from the host)
  • Executes user-defined threads
  • Does the “Find Home” and “Find Index” for initialization of motion systems
  • Handles all vector space calculations
  • Generates spherical and helical trajectory

The Task or Thread priority is as follows:

  1. Spherical and helical trajectory generator task
  2. Event Handler task
  3. Host communication task
  4. Acquire Samples task
  5. Find home, Find Index, Programs 1-10, and watchdog task -- all time-sliced every 2 ms

The interrupt priority is as follows:

  1. E-stop or shut down
  2. Host interrupt -- when a new command is sent to the board
  3. DSP interrupt -- when the DSP has a message for the 68331
  4. Timer interrupt

The onboard programs, which you download to the processor, have the following characteristics:

  • Memory -- for the 7344 boards, 64 Kbytes of RAM and 128 Kbytes of FLASH; for FlexMotion-6C, 32 Kbytes of RAM and 32 Kbytes of FLASH
  • Multithreading -- 10 programs (threads) can execute at a given time, in addition to host communication
  • Easy ways to create loops and waits
  • 120 onboard variables

The DSP has the following functions:

  • All point-point trajectory generation
  • The control loop (PID)
  • Stepper pulse generation
  • Electronic gearing
  • Move blending
  • Cubic splining -- for smoother and more accurate curves

The FPGAs have the following functions:

  • Quadrature decoder counters
  • High-speed capture
  • Position breakpoints
  • Limit switch detection (7344 only)
  • Stepper pulse generation (7344 only)
  • RTSI (7344 only)

Motion I/O
In addition to the I/O dedicated for motion, FlexMotion includes the following I/O components:

  • 12-bit ADCs -- for analog feedback and analog gearing. The FlexMotion-6C has 8 ADC channels, while the 7344 has 4 ADC channels.
  • Digital I/O -- general purpose I/O for ancillary use. The FlexMotion-6C has 24 bits of DIO, while the 7344 has 32 bits of DIO.