FIRST Tech Challenge Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot Use Sub VIs. Get error 1097 when compiling.

Solved!
Go to solution

Hello everyone.

I have the problem in the discription. I used alternative methods to create SubVis. I also have placed the VI in the project and outside the project.

This occurs no matter what is in the VI, from anything from adding 2 numbers to opperating a motor. Also having any combo of inputs/outputs doesn't matter.

Thanks for the help everyone! I can expand on anything if necisarry

0 Kudos
Message 1 of 5
(3,804 Views)

Eric,

Can you share your code?  That would make it a lot easier to troubleshoot.  One thing that pops into mind is if you developed your code while not targeted for NXT then you could have included functions that are not available for the NXT target.  You mention creating SubVIs using alternative methods, what does that mean?

-Steve

0 Kudos
Message 2 of 5
(3,044 Views)

Sure I can share some code: https://drive.google.com/file/d/0BxMVxGbffAcRUldnd0NVeHJGdjQ/edit?usp=sharing

Alternative means meaning using the SubVI creater in the edit menu. Also creating a new VI and populating it from their.

Thank you!

0 Kudos
Message 3 of 5
(3,044 Views)

As an update. I have made sure that each VI also has the NXT targeted. Still no go.

Even further update. I have uninstalled and reinstalled LV from the CD and from Online Download. No go.

Just to illustrate a bit more:

Just create a simple program that runs a motor. When it is compiled it works.

Select the code that runs the motor and create it into a SubVI. Save the new VI. Compile the original code, code is corrupted.

Re-open the SubVI, and copy and paste the motor code into the original VI. Delete the SubVI. Code will compile.

0 Kudos
Message 4 of 5
(3,044 Views)
Solution
Accepted by topic author Eric.Weber

Eric,

I finally got to an NXT to do some testing.  I have created a blank project and used your project for testing.  I have no issues creating and downloading subVIs from the blank project.  One thing I noticed in your project is that you don't have a basic remote control setup.  When I created that choosing tetrix motor 1 and 2 for drive motors then generated code, I had no issue creating and downloading subVIs in that situation.  If you created your VI from scratch, there might be something missing or not connected correctly with the project, not by your fault just not completely documented.

The sequence we always follow starting up is creating the schematic, creating a very simple remote program, generate code (adds all the basic connectivity and communications VIs) then we tweak, edit  and create our advanced code from the basic VI.

Hope this helps,

-Steve

Mentor Team 4150

0 Kudos
Message 5 of 5
(3,044 Views)