From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

VI Analyzer Enthusiasts Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

fpga targets

Solved!
Go to solution

Using scripting is it possible to check if a target is an fpga target? And then check where VIs on it are going to execute (dev computer or fpga target or third party target) ?  Is it possible to get details about FIFO, clocks (+clips), IO? I want get properties like type, data type, implementation for a FIFO and hz for a clock and the presence of derived clocks etc. So far I've got all the Targets in a project (this property will give fpga targets too irrespective of whether they are under a chassis or otherwise) and their OwnedItems[] (this will include everything directly under the target as visible in Items in the project)

Message 1 of 2
(4,294 Views)
Solution
Accepted by topic author shrewquest

To see if the TargetItem is an FPGA target, use the TypeString property of the TargetItem class. If the target is an FPGA target, then its TypeString value will be "FPGA Target":

typestring.png

To check the execution mode on the target (FPGA, Dev Computer, 3rd party, etc.), call this VI:

resource\RVI\emulation\niLvFpgaEmulationGet.vi

To get information about various items under the target (FIFOs, etc.) you'll need to use the Get All Descendents method to get references to those objects:

getdesc.png

There are lots of different "Type" strings you can wire in...here are a few that I think might be helpful for your use case:

  • Variable
  • cRIO Chassis
  • FPGA Target
  • Elemental IO
  • FPGA Base Clock
  • FPGA Derived Clock
  • RIO C Series Module
  • FPGA FIFO

Once you have references to the items you want to learn about, you'll need to use the (undocumented) scripting APIs that ship with LabVIEW here:

vi.lib\rvi\ClientSDK\Core\Script

These APIs are not officially supported by National Instruments, but they are the only way (that I know of) to accomplish what you're looking for. As an example, let's say you want to get the data type of an FPGA FIFO. Here's the code you would run:

fpgafifo.png

I hope this info gets you on the right track. Good luck!

0 Kudos
Message 2 of 2
(3,294 Views)