LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

FPGA Interface C API Generator doesn't create interface in .h file, and other LabVIEW FPGA issues

This is my first post. Experienced C/C++ guy, used to writing embedded VxWorks code talking to FPGAs on PCI bus architecture, complete with base addressing, and so on. New to LabVIEW, having finished Core 1 training. So yes, really new.

 

Development Environment:

LabVIEW 2020 on Windows 10 (development)

LabVIEW FPGA Module

LabVIEW FPGA C API Generator

CompactRIO drivers

LabVIEW Real-Time, plus 460+ other packages. 

VisualStudio 2019 - for standalone program to drive FPGA

MATLAB/Simulink model for auto-code of C and VHDL

 

Target

NI-PXIe-8880 Controller, in NI-1092 rack, running Windows-10

NI-PXIe-7822R (2)

NI-PXIe-7821R (2) - unused

NI-PXIe-4331 Bridge reader

NI-PXIe-4082 DMM

NI-PXIe-2527 MUX

 

Ethernet-connected -

Keysight power supply

 

Objective/Design

  • A LabVIEW UI that can run on a development PC or target (when system is delivered), that performs typical DAQ functions with the non-FPGA modules in the PXIe rack
  • LabVIEW UI communicates via TCP/IP with a standalone C++ program that controls the FPGA via C API. 
  • LabVIEW UI acts as server, C program is client for the TCP/IP communication.
  • The FPGA is programmed using the imported VHDL.
  • C++ program executes model that is auto-coded from MATLAB
  • FPGA runs VHDL from hardware portion of same model
  • FPGA outputs - continually overwrites output registers that C++ program samples at its own duty cycle. 
  • FPGA inputs - set by C++ program at 400Hz, interleaved with UI commands sent by LabVIEW user, and communicated to FPGA/hardware via generated interface

 

Development Approach

  • On development computer, follow NI Tutorial cookbook to create a simple FPGA project/VI to import the VHDL, compile it, generate lvbitx file, then generate header file/interface to be used by C program.
  • On Visual Studio, develop top-level executive that communicates with LV, calls the model step function, and communicates with FPGA via generated interface

What's working:

  • Able to import, and compile VHDL, using an IP Integration Node, and generate lvibitx file(s).
  • After uninstalling, reinstalling, and then repairing FPGA C API Generator, am able to get it to run from the Windows start menu, but not from within LabVIEW.

What's not working:

  • C API Generator runs to completion, and generates a header file. It contains the signature, and lvbitx reference, but that's it. No enums with hex values to use when calling the various set/get NiFpga library functions. Header file attached.
  • I'm unable to simulate the PXIe-782x modules from a blank project, despite having CompactRIO driver package installed (I'm assuming/hoping this is what's required), so I'm using a different FPGA with a similar architecture just so I can try to get the C interface developed. Shouldn't I be able to do everything but run the FPGA VI without any hardware?

In the attached example, I've whittled it down to one input, and one output, with the VI setting the input to a numeric constant - not that it matters - I'm not running the VI. The entire LV project, vhdl, lvbitx, etc. are attached.

 

Questions

  • Why am I getting no enums associated with IP Block I/O signals? Everything  was installed vi Package Manager.
  • Is there a better way to tell what drivers are installed, other than just looking at the installed packages list in NI Package Manager? It doesn't give me very much confidence.
  • When I try using NI examples, LV complains that I either don't have licenses for, or don't have drivers for the particular FPGAs. Am I cursed? I literally have everything installed.

 

Thank you for your time.

Patrick Olguin - LV Noob

Download All
0 Kudos
Message 1 of 1
(848 Views)