Go to Post I am really glad that FIRST gives teams the choice to use either students or adults in this role. - dtengineering [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 11-03-2014, 11:55
Eisa
 
Posts: n/a
Labview SubVI help

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.
Attached Thumbnails
Click image for larger version

Name:	Main Vi.png
Views:	52
Size:	25.3 KB
ID:	16536  Click image for larger version

Name:	SubVi Front Diagram.png
Views:	40
Size:	53.0 KB
ID:	16537  Click image for larger version

Name:	SubVi Block Diagram.png
Views:	43
Size:	119.3 KB
ID:	16538  
Reply With Quote
  #2   Spotlight this post!  
Unread 14-03-2014, 08:16
Tim Lehmann4967's Avatar
Tim Lehmann4967 Tim Lehmann4967 is offline
A Sentient Being
FRC #4967 (That O.N.E Team (Our Next Engineers))
Team Role: Alumni
 
Join Date: Dec 2013
Rookie Year: 2006
Location: In a gravitational field
Posts: 57
Tim Lehmann4967 will become famous soon enough
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?
Reply With Quote
  #3   Spotlight this post!  
Unread 14-03-2014, 09:38
plnyyanks's Avatar
plnyyanks plnyyanks is offline
Data wins arguments.
AKA: Phil Lopreiato
FRC #1124 (The ÜberBots), FRC #2900 (The Mighty Penguins)
Team Role: College Student
 
Join Date: Apr 2010
Rookie Year: 2010
Location: NYC/Washington, DC
Posts: 1,114
plnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond repute
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.
__________________
Phil Lopreiato - "It's a hardware problem"
Team 1124 (2010 - 2013), Team 1418 (2014), Team 2900 (2016)
FRC Notebook The Blue Alliance for Android
Reply With Quote
  #4   Spotlight this post!  
Unread 14-03-2014, 18:34
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,752
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
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
Reply With Quote
  #5   Spotlight this post!  
Unread 17-03-2014, 15:48
Eisa
 
Posts: n/a
Re: Labview SubVI help

Quote:
Originally Posted by Tim Lehmann4967 View Post
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 View Post
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.
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 20:18.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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