Example Code

Heartbeat Methods in LabVIEW FPGA

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Software

  • LabVIEW FPGA Module
  • LabVIEW Real-Time Module
  • LabVIEW

Code and Documents

Attachment

Overview

This example demonstrates how to generate heartbeat signals with different approaches in LabVIEW FPGA and how to check these heartbeats in real-time applicaton.

 

Description

This example describes three methods that allow you to monitor whether or not code on your FPGA is running:

  1. Have a while loop running on your FPGA code that simply toggles a boolean indicator on and off giving you a heartbeat to check if your code is working or not. You can then read this in your RT code.
  2. Use the IRQ's in your code. By having a Wait on IRQ and Acknowledge IRQ in your RT code you can wait for the FPGA code to assert an IRQ to let you know it started running before you continue your FPGA code.
  3. On cRIO models featuring a FPGA LED on the chassis generate a heartbeat to check if your code is working or not.

Requirements

 Software

  • LabVIEW Full or Professional Development System 2012 (or compatible)
  • LabVIEW Real-Time Module 2012 (or compatible)
  • LabVIEW FPGA Module 2012 (or compatible)

 Hardware

  • FPGA and Real-Time target (e.g. cRIO 9024 or compatible)

 

Steps to Implement or Execute Code

  1. Download and open the attached file "FPGA Heartbeat Methods LV2012 NIVerified.zip"
  2. Follow the instructions in Real-Time and FPGA Front Panel and Block Diagram and run the program

 

Additional Information or References

Real-Time VI:

RT Heartbeat Methods LV2012 NIVerified.vi - Front Panel.png

 

RT Heartbeat Methods LV2012 NIVerified.vi - Block Diagram.png

 

FPGA VI:

FPGA Heartbeat Methods LV2012 NIVerified.vi - Front Panel.png

 

FPGA Heartbeat Methods LV2012 NIVerified.vi - Block Diagram.png 

 

**The code for this example has been edited to meet the new Community Example Style Guidelines. The edited copy is marked with the text ‘NIVerified’. Read here for more information about the new Example Guidelines and Community Platform.**

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Ben Sisney
FlexRIO V&V Engineer
National Instruments
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.

Comments
Agile
Member
Member
on

Thanks for the code. Why have the IRQ interrupt on the FPGA_Heartbeat.vi?