Defining the Frequency of my FPGA Code for myRIO

Updated Jul 6, 2018

Reported In

Hardware

  • myRIO-1900
  • myRIO-1950

Software

  • LabVIEW FPGA Module
  • LabVIEW myRIO Software Bundle

Driver

  • NI-RIO

Issue Details

I am developing a simple signal acquisition or generation application in myRIO FPGA and I don´t know how to define the rate of my acquisition or generation loops. How can I define the frequency in myRIO FPGA code?

Solution

The recommended way to define a loop frecuency in FPGA is using the Loop Timer Express VI. The function of this Express VI is to control the period of a loop, it waits the value you specify in Count between loop iterations. 

To define the period from a given frequency just replace values in the next formula: 

T = 1/Frequency

To know the frequency of a loop ruled by a Loop Timer Express VI use the next formula:

= 1/Count

You can use a Flat Sequence Structure to control de dataflow in your FPGA code as shown in Figure 1.

Figure 1. Example of how to define the loop rate using the Loop Timer Express VI.

WAS THIS ARTICLE HELPFUL?

Not Helpful