Go to Post Soon, some of those teams will learn to rise about current and former powerhouses. - Akash Rastogi [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 23-01-2015, 19:03
auxchar's Avatar
auxchar auxchar is offline
Spaghetti Code Mentor
AKA: Austin Fuller
FRC #4009
Team Role: Programmer
 
Join Date: Feb 2013
Rookie Year: 2013
Location: Esko
Posts: 4
auxchar is an unknown quantity at this point
Command Based programming in LabVIEW?

I was researching Command Based Programming, and it seems to me like the ideal way to organize the code for a more complex robot, and our code is getting to the point where that sort of thing would be very helpful, but I can't seem to find it in LabVIEW. Does anyone know how/where we'd find the WPILib command-based stuff in LabVIEW?
Reply With Quote
  #2   Spotlight this post!  
Unread 23-01-2015, 19:10
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Command Based programming in LabVIEW?

There's been some casual discussion over the years about how one might implement Command Based Robot control. I don't know of anyone who has actually done it.
Reply With Quote
  #3   Spotlight this post!  
Unread 23-01-2015, 22:09
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: Command Based programming in LabVIEW?

I presented on this at championships a few years ago, but because of the roboRIO development, I didn't have a chance to implement it.

I'm work working on it again. I can explain the techniques and patterns, but it is not ready for sharing with others.

At the moment, each subsystem is built up using what I refer to it as command & control elements. The controller is the core implementation that owns actuators and sensors, maintains state, and runs at the rate appropriate to the operation being carried out on that mechanism. The commander acts as the interface to the rest of the code, being handed operation requests and set points, sending them to the controller, and notifying clients when operations complete. In some cases such as vision, a few globals are sufficient and no commander is actually needed.

It is useful to build a number of wrappers that simplify making the requests to the commander and potentially wait for completion. These wrappers can then be sequenced or run in parallel, the client can start and forget in teleOp, and can use the same command in auto but wait for completion.

I'm actually testing this out with a local team, and I agree that the simple framework that has been used doesn't offer enough structure for complex robots. I hope that we will offer both next season. Feel free to adopt any of this that makes sense, or if you find something else that works well, I'd love to hear about it.

Greg McKaskle
Reply With Quote
  #4   Spotlight this post!  
Unread 24-01-2015, 03:16
auxchar's Avatar
auxchar auxchar is offline
Spaghetti Code Mentor
AKA: Austin Fuller
FRC #4009
Team Role: Programmer
 
Join Date: Feb 2013
Rookie Year: 2013
Location: Esko
Posts: 4
auxchar is an unknown quantity at this point
Re: Command Based programming in LabVIEW?

Do you have any example code?
Reply With Quote
  #5   Spotlight this post!  
Unread 24-01-2015, 07:56
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: Command Based programming in LabVIEW?

I have code, but it isn't really up to example standards yet.

My suggestion would be to use the current framework, but start moving subsystems that need control elements almost entirely into the Periodic Tasks. Have it respond to a set point global or collection of globals. Then build up some subVIs that set the globals in order to command the mechanism. If you need a notification mechanism, you can use a global, but may want to look at the Notifier data type.

There are many teams that already write the code this way. I don't know if they consider it command based, but it helps to isolate and scale the code.

Greg McKaskle
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:14.

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