Go to Post ...several people have told my that my brain has been oxygen-starved since at least 1975. - dlavery [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

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Spotlight this post!  
Unread 28-01-2017, 08:17
Jonathan L. Jonathan L. is offline
Programmer alumnus, mentor, and CSA
FRC #1094 (Channel Cats)
 
Join Date: Jan 2013
Rookie Year: 2011
Location: St. Louis MO
Posts: 83
Jonathan L. is a jewel in the roughJonathan L. is a jewel in the roughJonathan L. is a jewel in the roughJonathan L. is a jewel in the rough
Re: Limit on how complex Teleop.vi should be?

Just by looking at it, I don't think it should be a problem for the roboRIO to handle. Using Elapsed Time.vi as Mark McLeod said would be a good idea if you really want to know for sure.

I see a Negate function just before the PID's process variable input. I don't know if that's what your looking for.



Visually, it does seam a bit messy. You can fix that by creating subVIs for each function (e.g. Drive.vi, Feeder.vi, Climber.vi, etc.). I wouldn't hesitate to copy the Joystick Get code into each of those VIs. If you end up with two actuators that are strongly related, you can still put those in the same vi. For example, in 2015 we had an elevator that used a motor and a pneumatic piston as a brake. The operator had an up button and a down button. Whenever, the up or down buttons were pressed, the brake would be off and the motor would move in the appropriate direction (assuming it was safe according to limit switches). If neither button was pressed the motor would be off and the brake would be on. That was all a subVI in TeleOp.

Additianaly, you can put most of that code inside a VI that gets reused in autonomous. See our code from last year for an example of that.

Of course there are other ways to organize code. This is just one way that you could easily use without having to learn a whole lot about communication inside a LabVIEW program.



FYI, I think you can safely remove the compressor code as the compressor will still run automatically as long as you open a solenoid.
Reply With Quote
 


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 04: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