Go to Post I Don't like to think in the Box so i try not to make robots look like them. - Tytus Gerrish [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 18-02-2011, 16:33
Ian McShane Ian McShane is offline
Registered User
FRC #3585 (Rogue Robots)
Team Role: Programmer
 
Join Date: Jan 2011
Rookie Year: 2009
Location: NH
Posts: 141
Ian McShane will become famous soon enoughIan McShane will become famous soon enough
Arm problem with PWM in teleop code

We have 2 motors on our arm, i have the 2 motors in teleop, begin, finish, and autonomous vi's. When i go into the front panel of the set output motor vi in teleop to change one to PWM 5 and the other to PWM 6, but when i close them out and reopen them, they change to become the same PWM. either 5 or 6. I need one to be 5 and one to be 6, how do i change this?
__________________
in FIRST, it's process over product, and team over robot.
http://www.roguerobotsof4h.com/
Team 3585 Rogue Robots of 4-H
Reply With Quote
  #2   Spotlight this post!  
Unread 18-02-2011, 20:12
dahlboy15 dahlboy15 is offline
Vice President
AKA: Dyson Dahl
FRC #3290 (Robo-Bears)
Team Role: Programmer
 
Join Date: Jan 2011
Rookie Year: 2010
Location: Baudette, MN
Posts: 14
dahlboy15 is an unknown quantity at this point
Re: Arm problem with PWM in teleop code

I'm not sure what motors you are using, either window or jaguars but there is a terminal on the vi that you can right click and choose create constant and then select the PWM option. Save and then reopen and it should be the same.
Reply With Quote
  #3   Spotlight this post!  
Unread 19-02-2011, 14:09
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: Arm problem with PWM in teleop code

Quote:
Originally Posted by Ian McShane View Post
When i go into the front panel of the set output motor vi in teleop to change one to PWM 5 and the other to PWM 6,...
You should not be changing anything inside those functions. You need to wire things to the function inputs. One of the inputs to the Set Output function is a "device reference", which you need to get from the output of a "Refnum Get" function.

Look at the motor control example, and then look at Tutorial 7 - Integrating Examples into Robot Code for detailed instructions. The tutorials are accessed from LabVIEW's Getting Started window.
Reply With Quote
  #4   Spotlight this post!  
Unread 19-02-2011, 21:13
MattCarey3625's Avatar
MattCarey3625 MattCarey3625 is offline
#3625 Programming and Wiring Head
FRC #3625 (Some Assembly Required)
Team Role: Programmer
 
Join Date: Jan 2011
Rookie Year: 2011
Location: Virginia Beach, VA
Posts: 23
MattCarey3625 is an unknown quantity at this point
Re: Arm problem with PWM in teleop code

Anything involving PWM should remain constant. There is no reason I can thin of that would require you to use the front panel between stages. Use a 'Constant' instead of 'Control'.
__________________
matt@hp-mini-110$> sudo make robot
sudo pass for matt:
unable to make robot
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: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