VeriStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How to import labview into veristand? (About FPGA, fpgaconfig)

Hello everyone! I am dealing with a project about HIL. There is something wrong with Labview program, and my job is to correct the Labview program. However, I don't know how Veristand can recognize the content from labview program. My senior told me that I need to compile the Labview program and I did that, after which I got a file with extension "lvbits". But when my senior showed me the operation process, a file with extension "fpgaconfig" is used. So I wonder how to generate the file with extension "fpgaconfig".

It is quite appreciated if someone can give me some tips.

0 Kudos
Message 1 of 4
(3,434 Views)

Hi Kanemo,

 

In VeriStand an XML file (*.fpgaconfig) is used to allow the Sys Def file to read in the FPGA bit file (lvbitx).  When you compile a FPGA program from Labview FPGA you get a lvbitx file, this is what tells the FPGA what to do.  The FPGACONFIG is an XML file that tells VeriStand how the FPGA was configured and allows the channels to be displayed in the VS Sys Def viewer.  You can use some add on's to create the XML file easier.  I have been using https://forums.ni.com/t5/NI-VeriStand-Add-Ons-Documents/NI-VeriStand-Add-On-FPGA-XML-Builder-Node/ta...

It has some bugs, but overall it is a pretty good tool.  You can also look at

https://github.com/NIVeriStandAdd-Ons

 

Make sure you have the NI VeriStand FPGA DMA.xsd and NI VeriStand FPGA DMA.xsl files in the same directory as your *.fpagconfig file.  This is needed to interpret the XML file.

 

Good luck

 

0 Kudos
Message 2 of 4
(3,421 Views)

Hi Joshe,

Thank you so much for your reply! But I still have some questions:

Is it necessary for all the FPGA nodes that are written in labview file, to be written in the .fpgaconfig?

   For example, when I have 8FU07_WIKXSFQC1EVA]9J5B.jpg  this in the .vi file, must I write the sentences into .fpga file like below?

   <Packet>

     <U32>

       <Name> PWM In 1 DC </Name>

       <Description>PWM output using digital line DIO11 on connector 0. </Description>

       <Category>Input\PWM</Category>

       <Unit>%</Unit>

       <Symbol>DI</Symbol>

       </U32>
  </Packet>
-------------------------
In fact now I am not familiar with xml grammar. But what I want to know is just as what I said above, are all the interfaces (or ports? ) in the .vi file should be reflected in the .fpgaconfig file?  I ask this because actually there is already a .fpgaconfig file in the computer. However after I checked the files already in my hand, I found that the descriptions in the file (.fpgaconfig) are not totally consistent with the file (.vi), and I think it abnormal.
Should I just rebuild a .fpgaconfig according to what you told me or is there an easier way like correcting the already exist .fpgaconfig?  
Thanks again!

0 Kudos
Message 3 of 4
(3,411 Views)

Hey Joshe,

 

Not sure if this is still relevant to you, but the FPGA custom device add-on will be way easier to work with than the XML editor: https://github.com/NIVeriStandAdd-Ons/FPGA-Custom-Device

 

Use the example that comes with the custom device download to add the interrupt for it to interface with VS. Any front panel controls or indicators will populate as potential scalar inputs and outputs when you import the bitfile into the custom device in VS. It's way less of a headache than messing around in XML files. Good luck.

 

JHP

0 Kudos
Message 4 of 4
(3,374 Views)