Table Of Contents

Determining Where to Run a Task in a Real-Time System

Last Modified: April 9, 2020

A task is a sequence of operations, typically contained within a loop, that collectively accomplish a high-level goal, such as data logging or controlling a hardware device. In a real-time system, you can choose to run a task on one of a few different targets. However, where you run the task depends on the timing, performance, and reliability requirements for your application.

Using the following table, select a target in the real-time system for each task in your application. In SystemDesigner, place the VI that contains the task on the target you identify.

Your system may not include all of the targets listed in the table.

Target Considerations Example Tasks
  • Advantages
    • Maximum performance—Because an FPGA is a hardware solution, algorithms that run on an FPGA are capable of highly deterministic continuous execution, at rates down to the tens of nanoseconds, and true parallel processing that is not possible in a software implementation.
    • Maximum reliability—Because FPGAs have no operating system, they are not susceptible to crashes or priority conflicts.
    • Offload processing—You can run computationally intensive processes on an FPGA to free up the real-time controller for other tasks. If CPU usage is high on your real-time controller and you have resources to spare on your FPGA, you can move computational tasks to the FPGA.
  • Disadvantages
    • Limited resources—Because an FPGA is a hardware solution, FPGA applications are limited to the number of memory items available on the FPGA chip.
    • Potentially complex programming—Because FPGA resources are limited, you often have to optimize the code to fit on the FPGA and meet your requirements. Optimizing FPGA code can require programming practices, such as handshaking and pipelining, that are typically unnecessary for applications that run on a processor.
    • Limited data types and available operations—FPGAs support a limited number of data types, such as numeric, Boolean, and reference data types. FPGA applications do not support many operations that processor-based applications do, such as file I/O and networking capabilities.
  • High-performance control loops
    • 200 kHz analog Proportional-Integral-Derivative (PID) control loop
  • High-speed signal acquisition and generation
    • Vibration
    • Tachometers
    • Custom digital protocols
  • Signal processing and analysis
    • Spectral analysis
    • Filtering
    • Third-party IP integration
    • Viterbi and Turbo decoders
  • Safe state logic
    • Set all hardware to safe states in case of emergency
  • Communicate with real-time processor
Real-time controller
  • Advantages
    • Deterministic timing—A real-time application can consistently respond to events and perform tasks within a short, bounded amount of time, down to the tens of microseconds, while ensuring that high priority tasks execute first.
    • High reliability—You can maintain determinism in an application that runs continuously for months.
    • Ease of programming—You can reuse code directly from the PC on a real-time controller and even debug code as it runs on the real-time controller.
  • Disadvantages
    • Limited performance—As a software solution, real-time controllers are incapable of true parallel processing and cannot achieve the execution speeds of an FPGA.
    • Limited resources—High-performance real-time applications can quickly occupy full CPU usage. High CPU usage can lead to jitter.
  • Log data to file
  • Signal processing and analysis
    • Spectral analysis
    • Filtering
  • Communicate with FPGA
  • Communicate with PC over a network
  • Monitor system health
  • Advantages
    • User interface—You can visualize data sent from the real-time system and send commands to the real-time system.
    • Offload processing—You can use the PC to run processing tasks that do not need to happen deterministically or as part of the real-time system to make more CPU and FPGA resources available.
  • Disadvantages
    • Non-deterministic—PC operating systems are not designed to execute tasks deterministically.
    • Limited reliability—General purpose operating systems are typically more susceptible to crashes than real-time operating systems or FPGAs.
  • Remotely connect to real-time system over a network
  • Display relevant data on the user interface
  • Update settings and send commands to the real-time system
  • Retrieve data log files from the real-time system
  • Perform offline data analysis and processing


The following image illustrates tasks you might run on each target in a control and monitoring system.

Recently Viewed Topics