LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

VI doesn't work in different project

I made a VI for an FPGA in a test project and it worked perfectly. It is a code to generate a PWM and my controller is attached to a oscilloscope so I can see directly if it works.

 

Since the test project was full of other tests I decided to start a new project to start fresh. I exactly copy and pasted the block diagram into the new project, but now it doesn't work anymore. I get no errors, the code compiles and when I run it in simulation mode it gives exactly what is expected. It just doesn't show anything on the oscilloscope anymore. When I switch back to the other file in the other project it works again, so there is nothing wrong with cables or anything.

 

Did I miss a step when making the new project? What could be wrong? The controller is connected. Thanks in advance!

0 Kudos
Message 1 of 3
(633 Views)

Hi Britt,

 

so there is a problem with your VI and you want us to analyze that problem?

Without looking at the code (and all related properties, kept in the project)?

 

Do you access FPGA resources inside that VI?

Did you relink those resources, just to make sure the VI uses the correct resources?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 3
(625 Views)

See if this works.

  1. Be sure your original Project still works.
  2. Copy the entire Project to another Folder, and change the Project name (rename the .lvproj file).  For "cleanest" results, it is better that the original Project Folder (and its files) be temporarily "hidden" (one way is to create a "Hidden" folder on your desktop and move the original project into it).
  3. Now open the Copy, and verify that it still works.  It will probably have to "look for its various parts", but it should find them.
  4. Save this in this "working" state in your Version Control system.  You are going to want to be able to easily "undo" any changes.
  5. Start paring down your Top Level VI, throwing away stuff you aren't ready to test.  "Patch" around existing code (for example, if you have a section that asks the user "Where are the settings saved?", and then reads and loads settings, delete the Question and wire a constant value where the Answer should go).  Test it.  If it works, Commit (I'm using Subversion language, where "Commit" means "Save this as the current Working Copy").  If it doesn't, Revert (get your VCS to undo your changes, and this time, change "less").  
  6. In addition to "throwing away" pieces of the Top Level VI, you can probably also eliminate TypeDefs and sub-VIs, but remember to "Test After Deleting", and either "Commit if Successful" or "Revert if Unsuccessful".

This should eventually converge on a small "working" Working Copy.

 

Bob Schor

0 Kudos
Message 3 of 3
(571 Views)