LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

New controls not available in Read/Write Control when I change FPGA Main.vi

Hello everyone,

 

So, I'm new to Labview, and I'm trying to get my research project working.  I've started my Labview project with a built-in example that reads in some analog values on my Crio's FPGA, sends them to the RT Main vi using the Read/Write Control, and does some calculations.  That all works fine; the problem is that if I attempt to add more inputs on the FPGA I can't select them from the Read/Write control block, even though these controls are visible on the FPGA Main.vi front panel and work correctly there.  I've tried recompiling everything, but I can't seem to get the Read/Write Control block to update.  What am I doing wrong?

Thanks,

Michael

0 Kudos
Message 1 of 7
(3,945 Views)

By recompiling, I'll assume you mean that you've rebuilt the bit file of the FPGA.

 

Make sure wherever you open the FPGA Bit file reference in your host VI, that you are referencing the correct bit file.  Perhaps it is still referencing an old version or a different named file that did not include the new controls.

0 Kudos
Message 2 of 7
(3,937 Views)

Yes, that's what I've done.  I have my FPGA.vi file as the input to the "Open FPGA VI Reference" block, not a bit file.  If I try and select a bitfile I get an error, actually; it says there's a bad wire even though no red X symbols show up on the block diagram.

0 Kudos
Message 3 of 7
(3,927 Views)

1. I would recommend trying to do your calculations inside of the FPGA, especially if they are simple ones.

2. It would help us diagnose your issue if you posted some code.  In this situation, the project and all of the VIs would be needed (put them all in a zip file).

3. Are your Read/Write Control inside of a subVI?  If so, you will need to make sure you update all of the FPGA reference controls to have the updated interface.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 7
(3,889 Views)

Hey crossrulz, thank you for the response.

 

Attached is my project (the buck converter name is from a previous experiment).

 

i can appreciate that it's better to do calculations inside of the FPGA, but the particular approach I'm using (an FFT on an input signal) wouldn't allow for that without a lot of leg work, and I need to try and get some results today 😮  

 

The read/write control is in my RT Main VI, so no its not in a subVI.  The control I'm trying to read is directly in the FPGA Main VI.  I tried copying and pasting a control that is detected by the read/write control, and the duplicate isn't being detected.  Any ideas?

 

Thanks,

Michael
EDIT: I just noticed that the folder I uploaded has a couple loose ends lying around.  To get it to run switch back the initialization target from the bitfile to the FPGA Main_2 VI and delete the wrap angle block in the RT Main VI

0 Kudos
Message 5 of 7
(3,864 Views)

Ok, you have a type def for the FPGA interface.  Whenever you add controls/indicators to your FPGA build, you have to update the type def.  Inside of the type def, right-click on the FPGA VI Reference and choose "Configure FPGA VI Reference".  From there, you can import from either the VI or the bitfile.  It does not really matter which.  The FPGA VI Reference will then have the updated interface for the FPGA.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 6 of 7
(3,845 Views)

Hey, thanks for your help.  As a quick update I found my way around the problem by connecting a separate FPGA reference directly to my Read/Write control block.  I tried to update the type def, but for whatever reason I couldn't get that to work.  I have a feeling I was being overridden by some other setting in the project.  Anyways, I have a workaround now, so I'm not going to worry about it until after my deadline 😉

0 Kudos
Message 7 of 7
(3,841 Views)