Go to Post Incidentally, the best Delphi is ChiefDelphi! :) - Max Lobovsky [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-04-2009, 04:11
pyr0b0y pyr0b0y is offline
Programmer/Electrical
AKA: Josh
FRC #0253 (Mills Robotics Team)
Team Role: Mentor
 
Join Date: Dec 2007
Rookie Year: 2004
Location: Millbrae
Posts: 78
pyr0b0y is an unknown quantity at this point
Send a message via AIM to pyr0b0y
Autonomous Open Motor

If I have Autonomous and am using PWM 1 and 2 for my drive motors, and I want to start two rollers that are controlled by PWM 3 and 4, how do i open the reference in the Code, or do you have to link it from Basic Robot Main???
Reply With Quote
  #2   Spotlight this post!  
Unread 11-04-2009, 12:34
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,563
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: Autonomous Open Motor

If you're going to use it in both autonomous and in your basic robot main, you should publish the device reference as a global variable, like the RobotDriveDevRef is. See chapter 4 of the FRC Programming guide for instructions on how to do that.
Reply With Quote
  #3   Spotlight this post!  
Unread 12-04-2009, 17:38
pyr0b0y pyr0b0y is offline
Programmer/Electrical
AKA: Josh
FRC #0253 (Mills Robotics Team)
Team Role: Mentor
 
Join Date: Dec 2007
Rookie Year: 2004
Location: Millbrae
Posts: 78
pyr0b0y is an unknown quantity at this point
Send a message via AIM to pyr0b0y
Re: Autonomous Open Motor

Ok so since our robot is using 2 rollers to collect balls, i created to global refs for them...but when i try to wire it in labview it wont let me, it seems that you are not able to just use motor open. what am i doing wrong?
Attached Files
File Type: vi Autonomous Independent.vi (29.5 KB, 45 views)
File Type: vi Basic Robot Global.vi (46.1 KB, 37 views)
Reply With Quote
  #4   Spotlight this post!  
Unread 12-04-2009, 17:59
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,563
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: Autonomous Open Motor

The variables you created in the Basic Robot Global are RobotDriveDevRefs, rather then the DevRefs from Motor Open. That's why it's giving you a type error.

Also, in the Autonomous Independent, your last Watchdog Delay and Feed doesn't have the device reference wired.
Reply With Quote
  #5   Spotlight this post!  
Unread 13-04-2009, 22:25
JasonF JasonF is offline
Registered User
FRC #2848 (The All Sparks)
Team Role: Programmer
 
Join Date: Apr 2009
Rookie Year: 2009
Location: Irving Texas
Posts: 24
JasonF is an unknown quantity at this point
Re: Autonomous Open Motor

Yes you will need to open them in the Begin.vi (if you are using the advanced framework, which it sounds like) and then Simply click on the MotorOpen.vi and copy the Robot DefRev and paste it into your robot data.ctl Go to the bundle and expand it by 1 or 2 or w.e, click the name, find the new PWM device and select all elements.

Down in your autonomous expand the Unbundle of the Robot Data In and select the PWM device and "All Elements" and use from there.

Be sure not to delete or copy the existing Controls or Indicators such as Global Data, Robot Data in/Out, Periodic Tasks, etc. Because deleting them will mess up the SubVis (Begin, Teleop, etc) and will require them to be remade into Subvis. Instead simply paste your new Device Refs into each control/indicator point.

If you need more help message me.
Jason
Reply With Quote
  #6   Spotlight this post!  
Unread 16-04-2009, 22:47
pyr0b0y pyr0b0y is offline
Programmer/Electrical
AKA: Josh
FRC #0253 (Mills Robotics Team)
Team Role: Mentor
 
Join Date: Dec 2007
Rookie Year: 2004
Location: Millbrae
Posts: 78
pyr0b0y is an unknown quantity at this point
Send a message via AIM to pyr0b0y
Re: Autonomous Open Motor

ok so i figured out how to create a global variable, but i am still not to get it inside of the loop. please take a look at my VI's. Thanks!
Attached Files
File Type: vi Belt Roller Global.vi (33.2 KB, 67 views)
File Type: vi Autonomous Independent.vi (29.3 KB, 49 views)
Reply With Quote
  #7   Spotlight this post!  
Unread 17-04-2009, 12:11
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,563
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: Autonomous Open Motor

Right click on the global variable and choose change to read.
Reply With Quote
  #8   Spotlight this post!  
Unread 17-04-2009, 12:17
pyr0b0y pyr0b0y is offline
Programmer/Electrical
AKA: Josh
FRC #0253 (Mills Robotics Team)
Team Role: Mentor
 
Join Date: Dec 2007
Rookie Year: 2004
Location: Millbrae
Posts: 78
pyr0b0y is an unknown quantity at this point
Send a message via AIM to pyr0b0y
Re: Autonomous Open Motor

i tried that but everytime i try to connect it to the motorcontroldevref, its breaks the wiring...i'm doing this in basic robot main by the way
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Open motor reference on Slot 6 DIO Module trilogy2826 NI LabVIEW 2 27-01-2009 08:42
White Paper Discuss: Approx. Motor Spec for Taigene Motor Joe Johnson Motors 2 22-01-2005 16:36
Problems with Autonomous due to motor setup xxlshortys Programming 10 16-03-2004 14:38
External metal jacket on the Drill motor and FP motor, WHY? archiver 2001 3 24-06-2002 04:22
External metal jacket on the Drill motor and FP motor, WHY? Dennis Hughes Technical Discussion 1 04-06-2001 11:59


All times are GMT -5. The time now is 10:32.

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