Go to Post Given the time Banebots has already cost us, what's a little snow? - pfreivald [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 25-10-2015, 04:16
obsunal obsunal is offline
Registered User
FRC #4191
 
Join Date: Sep 2015
Location: Turkey
Posts: 3
obsunal is an unknown quantity at this point
Question Autonomous Independent Cluster Input

Hi,
How can i send my cluster to autonomous vi from vision processing vi? To teleop I have used vi terminals but there is no terminal for Autonomous. I tried global variables but couldn't figure out how. I've attached screenshot of robot main.
Attached Thumbnails
Click image for larger version

Name:	Robot Main.PNG
Views:	31
Size:	35.1 KB
ID:	19371  
Reply With Quote
  #2   Spotlight this post!  
Unread 25-10-2015, 09:20
Ari423's Avatar
Ari423 Ari423 is offline
LabVIEW aficionado and robot addict
AKA: The guy with the yellow hat
FRC #5987 (Galaxia)
Team Role: Mentor
 
Join Date: Mar 2015
Rookie Year: 2012
Location: Haifa, Israel
Posts: 540
Ari423 has a brilliant futureAri423 has a brilliant futureAri423 has a brilliant futureAri423 has a brilliant futureAri423 has a brilliant futureAri423 has a brilliant futureAri423 has a brilliant futureAri423 has a brilliant futureAri423 has a brilliant futureAri423 has a brilliant futureAri423 has a brilliant future
Re: Autonomous Independent Cluster Input

I see a few problems here:

Firstly, your wire going from Vision to Teleop is going the wrong direction; it is an output from teleop that is being passed into Vision. If you did want to use wires for this for some reason, you would want to reverse the direction of the wire by changing the control in Vision to an indicator and the indicator in Teleop to a control.

More importantly, you can't use wires to pass information between parallel loops. The loop receiving the info will wait for the first loop to end before it gets only the information from the last pass from the first loop. Since you want these loops running in parallel, this method won't work. For parallel loops you will need to use global variables. You can set them in one loop (vi) and then read them in another. FIRST gives us a global variable in the prebuilt robot framework. You can add elements to the preexisting global by adding controls to its front panel and then drag it into the vi where you want to read write it. You can find more information on global variables here.
__________________
2017-present: Mentor FRC 5987
2017-present: CSA for FIRST in Israel
2012-2016: Member FRC 423
2013: Programmer
2014: Head Programmer, Wiring
2015: Head Programmer, Wiring
2016: Captain, Head Programmer, Wiring, Manipulator, Chassis, CAD, Business, Outreach (basically everything)


Reply With Quote
  #3   Spotlight this post!  
Unread 25-10-2015, 10: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,748
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: Autonomous Independent Cluster Input

Parallel operations cannot share data through synchronized data flow wires. If they did, they'd no longer be parallel and independent.

So there are a number of additional language constructs in LabVIEW to support the sharing of data when in a parallel, non-sequential situation. The easiest to use, and the one the framework suggests in the attached comment, is the variable. In this case, the global variable. Write to it in the Vision loop and read from it in the auto loop and it probably does what you need. The only additional consideration you may want is to initialize it so that things don't misbehave if vision is removed or failing to function how it is supposed to.

Just to look at alternatives.

When you do not want to miss a value, you may want to use a queue. Vision would enqueue information, and autonomous would dequeue and process it. Because the information in the queue can get stale pretty quickly, I don't think a queue is a good idea.

When you want a more event-driven form of execution, you may want to use a notifier. This is a special form of single-element-queue with overwrite. The vision loop would post a notification to auto when it sees something, and the auto would automatically sleep until something is posted.

Other data sharing mechanisms exist as well, and the functional global lets you build your own that are custom suited to your task.

But in the case of vision and auto, a simple global variable is really pretty good approach.

Greg McKaskle
Attached Thumbnails
Click image for larger version

Name:	From Clipboard 2.png
Views:	15
Size:	39.1 KB
ID:	19372  
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 03:56.

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