Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   NI LabVIEW (http://www.chiefdelphi.com/forums/forumdisplay.php?f=182)
-   -   Labview SubVI help (http://www.chiefdelphi.com/forums/showthread.php?t=127742)

Eisa 11-03-2014 11:55

Labview SubVI help
 
3 Attachment(s)
Hello Chief Delphi,

I am currently running LabView for NXT Mindstorms.

I have a program that makes the robot turn left, then track parallel white lines on a road before coming to a stop at a red line.

I am trying to run this specific program twice in a row. To keep my program simple looking, I placed it in a subVI. Wiring two instances of the subVI together, however, does not make the program run twice. The robot ends up finishing one subVI, however does not move on the next subVI. Manually copying and pasting the program twice onto one VI and then wiring them together does however allow the robot to complete both programs in sequence. How can I have the two subVIs wired together to work properly?

Attached are images of the main VI and the subVI's front and back diagram.

Any help about subVIs in general would be greatly appreciated as well.

Tim Lehmann4967 14-03-2014 08:16

Re: Labview SubVI help
 
I am just getting into LabVIEW, but I have noticed a few similarities to NXT-G. You should be able to simply loop your first operation. May I ask why you are using LabVIEW to do this instead of NXT-G?

plnyyanks 14-03-2014 09:38

Re: Labview SubVI help
 
A for loop that runs twice should allow you to do what you want. In the meantime, here's a NI white paper all about subVIs.

Greg McKaskle 14-03-2014 18:34

Re: Labview SubVI help
 
I can't say wh your subVI doesn't run twice, the way you've written it to. The nxt target has limited debugging, but it you can add a breakpoint or probe a font panel value, that may help explain.

Greg McKaskle

Eisa 17-03-2014 15:48

Re: Labview SubVI help
 
Quote:

Originally Posted by Tim Lehmann4967 (Post 1358815)
I am just getting into LabVIEW, but I have noticed a few similarities to NXT-G. You should be able to simply loop your first operation. May I ask why you are using LabVIEW to do this instead of NXT-G?

We are doing a more advanced challenge and feel we can put our labview skills to the test. We also want a more cleaner code to work with, rather than the bulkiness of NXT-G

Quote:

Originally Posted by plnyyanks (Post 1358835)
A for loop that runs twice should allow you to do what you want.

We are going to put different subVIs together in this type of sequence. I am simply repeating one to test the sequence structure in general. We will be putting roughly 50 subVIs together, so we are just wanting to make our code look extremely clean and easily interchangeable.


All times are GMT -5. The time now is 08:58.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi