Go to Post Heidi's best picture ever - and she didn't even have to Photoshop this one! - 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

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 15-02-2010, 13:18
K Lenox's Avatar
K Lenox K Lenox is offline
I AM GOD IN GEARS OF WAR!!!!
FRC #2632 (Comets Unleashed)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2009
Location: Amherst
Posts: 26
K Lenox is an unknown quantity at this point
How do you wire a Kick motor in labview?

Hello I am Lead Programmer for Amherst Robotic Team#2632 Comets Unleashed.

I need help for the autonomous mode for labVIEW

My plan is to make the program do this
[ move forward, stop, kick the ball] Repeat 3 times.

working form the outside in:

ForLoop1(with loop count set at three), Watchdog open, RobotDriveRegerstryGet(Left and Right Motors)

[inside ForLoop1] WhileLoop, ForLoop2(loop count st at 1)
[inside WhileLoop] Watchdog Feed, Drive TankDrive(75%MaxSpeed), ElapsedTime(set to 3 Seconds)(connected to loop condition)
[inside ForLoop2] Watchdog Feed, Drive TankDrive(0%Max Speed),
All the Watchdog's are connected/All the Drive TankDrive's are connected with the Purple Line

So that is what I have. My question is now how do I connect the kick motor so it preforms the way I stated above. I have a program thats like this [MotorControlRegisteryGet(labled KickMotor), connected with a purple line to Motor SetSpeed(Constant at 1). Does that need to go there?

Also as a side Note I would like to connect a Watchdog Kill at the very End of everything, but It won't let me. It says this after I connect the purple line from the secoon Watchdog Feed to the Watchdog Kill. It connects to the ForLoop2 making a tunnel, then the ForLoop1 making a tunnel. Then there is a broken wire between the ForLoop1 tunnel and the Watchdog Kill. I hovered the mouse over it and it said this:

"Array element conflict
Thetype of source is 2-D array of typedef 'WatchdogDevRef.ctl'
cluster of 1 element
The type of the sink is typedef 'WatchdogDevRef.ctl'
clustter of 1 element"


If you could explain what that is and how I could connect it that would be great.

Thanks, any help appreciated.

Kyle Lenox
__________________
[font="Times New Roman"]
You never saw this message
You never read this
You will read the next available object within sight



Why are you still reading this???  Begone with you!!!
[SIGPIC]
Reply With Quote
  #2   Spotlight this post!  
Unread 15-02-2010, 13:21
K Lenox's Avatar
K Lenox K Lenox is offline
I AM GOD IN GEARS OF WAR!!!!
FRC #2632 (Comets Unleashed)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2009
Location: Amherst
Posts: 26
K Lenox is an unknown quantity at this point
Re: How do you wire a Kick motor in labview?

Sorry there is a typo. this paragrah is supposed to say this"

Also as a side Note I would like to connect a Watchdog Kill at the very End of everything, but It won't let me. I connect the purple line from the secoon Watchdog Feed to the Watchdog Kill. It connects to the ForLoop2 making a tunnel, then the ForLoop1 making a tunnel. Then there is a broken wire between the ForLoop1 tunnel and the Watchdog Kill. I hovered the mouse over it and it said this:

Sorry for that, didnt mean to cause the confusion!!

Kyle Lenox
__________________
[font="Times New Roman"]
You never saw this message
You never read this
You will read the next available object within sight



Why are you still reading this???  Begone with you!!!
[SIGPIC]
Reply With Quote
  #3   Spotlight this post!  
Unread 15-02-2010, 15:10
Omar's Avatar
Omar Omar is offline
Registered User
no team
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2008
Location: Huntsville, AL
Posts: 122
Omar is a glorious beacon of lightOmar is a glorious beacon of lightOmar is a glorious beacon of lightOmar is a glorious beacon of lightOmar is a glorious beacon of light
Re: How do you wire a Kick motor in labview?

Quote:
Originally Posted by K Lenox View Post
Also as a side Note I would like to connect a Watchdog Kill at the very End of everything, but It won't let me. I connect the purple line from the secoon Watchdog Feed to the Watchdog Kill. It connects to the ForLoop2 making a tunnel, then the ForLoop1 making a tunnel. Then there is a broken wire between the ForLoop1 tunnel and the Watchdog Kill. I hovered the mouse over it and it said this
Kyle Lenox
It is because the For Loop default to an array for ANY output from a For Loop.
Right click the tunnel going out of the For Loop and select "Disable Indexing"

I have to ask Why do you feel you need to kill the watchdog?
I have never found a need to kill the watchdog.
Are you uning it as a globle means to shut down your robot?
__________________
Omar
Reply With Quote
  #4   Spotlight this post!  
Unread 15-02-2010, 15:30
apalrd's Avatar
apalrd apalrd is offline
More Torque!
AKA: Andrew Palardy (Most people call me Palardy)
VRC #3333
Team Role: College Student
 
Join Date: Mar 2009
Rookie Year: 2009
Location: Auburn Hills, MI
Posts: 1,347
apalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond repute
Re: How do you wire a Kick motor in labview?

Instead of running while loops in Autonomous Independent (which is what I think you are doing, pictures would help alot), you can feed the watchdog in the Autonomous Iterative, then put Auton code in Autonomous Independent. Autonomous Iterative will be fed with new data packets, so it will run at 50hz and can feed the watchdog while you do other stuff.

You could put all of your autonomous code in a Flat Sequence Structure, that makes things easy to understand. If you have all of your major robot actions in SubVI's (e.g. drive_x_distance.vi, turn_x_angles.vi, etc). you could alternatively wire a "flow wire" between them, just a wire of any datatype (I use doubles because I like orange), and LabVIEW will make sure they run in sequence because it must follow the path of the data.

Screenshots will help everyone see what you are trying to do much better than text.

I also recommend driving based on distance instead of time, its not really hard to do. See attached VI for example of that. You don't really need to include the X axis processing, it just helps with drift. All of the constants that are 0 need to be tuned.

I also have a state-machine for my kicker, so I can set the state and another loop (similar to PeriodicTasks.vi) will handle the recoil/kicking. I can set the state in a VI, wire the flow wire to a Drive, and the state-machine will run in the background, not blocking the Drive code.
Attached Files
File Type: vi drive_straight.vi (16.7 KB, 32 views)
__________________
Kettering University - Computer Engineering
Kettering Motorsports
Williams International - Commercial Engines - Controls and Accessories
FRC 33 - The Killer Bees - 2009-2012 Student, 2013-2014 Advisor
VEX IQ 3333 - The Bumble Bees - 2014+ Mentor

"Sometimes, the elegant implementation is a function. Not a method. Not a class. Not a framework. Just a function." ~ John Carmack
Reply With Quote
  #5   Spotlight this post!  
Unread 15-02-2010, 15:33
Omar's Avatar
Omar Omar is offline
Registered User
no team
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2008
Location: Huntsville, AL
Posts: 122
Omar is a glorious beacon of lightOmar is a glorious beacon of lightOmar is a glorious beacon of lightOmar is a glorious beacon of lightOmar is a glorious beacon of light
Re: How do you wire a Kick motor in labview?

Quote:
Originally Posted by K Lenox View Post
ForLoop1(with loop count set at three), Watchdog open, RobotDriveRegerstryGet(Left and Right Motors)

[inside ForLoop1] WhileLoop, ForLoop2(loop count st at 1)
[inside WhileLoop] Watchdog Feed, Drive TankDrive(75%MaxSpeed), ElapsedTime(set to 3 Seconds)(connected to loop condition)
[inside ForLoop2] Watchdog Feed, Drive TankDrive(0%Max Speed),

Kyle Lenox
you could use something like this
Attached Thumbnails
Click image for larger version

Name:	ForLoop3times.png
Views:	66
Size:	13.3 KB
ID:	8684  
__________________
Omar
Reply With Quote
  #6   Spotlight this post!  
Unread 15-02-2010, 15:56
K Lenox's Avatar
K Lenox K Lenox is offline
I AM GOD IN GEARS OF WAR!!!!
FRC #2632 (Comets Unleashed)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2009
Location: Amherst
Posts: 26
K Lenox is an unknown quantity at this point
Re: How do you wire a Kick motor in labview?

Thanks for the responses

to answer some questions I am using Autonomous __.

I am also using the Watchdog Kill because somehow when working in the autonoous we ran it and found out that some times it will run again for an additional 20 seconds. We have used it for fear of it acting up in the competition.

Also Id send you a picture but I don't knw how to do that.

Now just to question something. Someone had a thumbnial witha piture of what his program would look like and there was a bunch of question marks in the Kick the ball loop. What are the questions for???

Thanks once again and any help is appreciated!!

Kyle lenox
__________________
[font="Times New Roman"]
You never saw this message
You never read this
You will read the next available object within sight



Why are you still reading this???  Begone with you!!!
[SIGPIC]
Reply With Quote
  #7   Spotlight this post!  
Unread 15-02-2010, 16:21
Omar's Avatar
Omar Omar is offline
Registered User
no team
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2008
Location: Huntsville, AL
Posts: 122
Omar is a glorious beacon of lightOmar is a glorious beacon of lightOmar is a glorious beacon of lightOmar is a glorious beacon of lightOmar is a glorious beacon of light
Re: How do you wire a Kick motor in labview?

You did not explane how you are kicking the ball.

How are you going to kick the ball?

What hardware?

Relays?
Solenoids?
Pneumatic?
Rubber bands?
__________________
Omar
Reply With Quote
  #8   Spotlight this post!  
Unread 15-02-2010, 16:45
Omar's Avatar
Omar Omar is offline
Registered User
no team
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2008
Location: Huntsville, AL
Posts: 122
Omar is a glorious beacon of lightOmar is a glorious beacon of lightOmar is a glorious beacon of lightOmar is a glorious beacon of lightOmar is a glorious beacon of light
Re: How do you wire a Kick motor in labview?

Quote:
Originally Posted by K Lenox View Post
I am also using the Watchdog Kill because somehow when working in the autonoous we ran it and found out that some times it will run again for an additional 20 seconds.
Kyle lenox
You have to explicitly set the motor speed to 0 to stop your robot. Even if your autonomous code stops, that does not tell the motors to stop.

Killing the watch dog is not a clean way to shut down.

Set the motor speed to 0 before exiting your autonomous mode.
__________________
Omar
Reply With Quote
  #9   Spotlight this post!  
Unread 15-02-2010, 17:01
K Lenox's Avatar
K Lenox K Lenox is offline
I AM GOD IN GEARS OF WAR!!!!
FRC #2632 (Comets Unleashed)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2009
Location: Amherst
Posts: 26
K Lenox is an unknown quantity at this point
Re: How do you wire a Kick motor in labview?

My mentor wanted to acually try if there was a componet to convert 3 digitial inputs and converts it to a decimal value output, which we will use in a case statement to program the robot to run one of three Autonomous Modes.

The idea is that we can taggle back and forth between 3 autonomous modes for the three starting areas of the arena. By fliping a switch on a box we can control which Autonomous mode we want running.

If someone has a way to make 3 choices (I/O 6, 7, and 8), with only 1 choice being true and the other two false, then take case stucture(figured this would work because there are multiple pannels that you could choose to activate) and make it so that the true I/O pulls up its corisponding pannel and runs it.

We are wanting this to work but this is both our first time woring in labVIEW and we don't know how to do it. We are trying to expirement with it, but some advice and knowhow from the professionals will be great. Thx

Any help is appreciated, thx!!

Kyle Lenox
__________________
[font="Times New Roman"]
You never saw this message
You never read this
You will read the next available object within sight



Why are you still reading this???  Begone with you!!!
[SIGPIC]
Reply With Quote
  #10   Spotlight this post!  
Unread 15-02-2010, 17:03
K Lenox's Avatar
K Lenox K Lenox is offline
I AM GOD IN GEARS OF WAR!!!!
FRC #2632 (Comets Unleashed)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2009
Location: Amherst
Posts: 26
K Lenox is an unknown quantity at this point
Re: How do you wire a Kick motor in labview?

Sorry about that, we are using motors to kick the ball.
__________________
[font="Times New Roman"]
You never saw this message
You never read this
You will read the next available object within sight



Why are you still reading this???  Begone with you!!!
[SIGPIC]
Reply With Quote
  #11   Spotlight this post!  
Unread 15-02-2010, 17:05
K Lenox's Avatar
K Lenox K Lenox is offline
I AM GOD IN GEARS OF WAR!!!!
FRC #2632 (Comets Unleashed)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2009
Location: Amherst
Posts: 26
K Lenox is an unknown quantity at this point
Re: How do you wire a Kick motor in labview?

Also the motor speed is set to zero. I am using the watchdog to kill the motors, not to kill the watchdog.
__________________
[font="Times New Roman"]
You never saw this message
You never read this
You will read the next available object within sight



Why are you still reading this???  Begone with you!!!
[SIGPIC]
Reply With Quote
  #12   Spotlight this post!  
Unread 15-02-2010, 17:09
Omar's Avatar
Omar Omar is offline
Registered User
no team
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2008
Location: Huntsville, AL
Posts: 122
Omar is a glorious beacon of lightOmar is a glorious beacon of lightOmar is a glorious beacon of lightOmar is a glorious beacon of lightOmar is a glorious beacon of light
Re: How do you wire a Kick motor in labview?

Quote:
Originally Posted by K Lenox View Post
Sorry about that, we are using motors to kick the ball.
OK?

So how are you using the motor to kick a ball?
Do you just set it to some speed and leave it on?
If so then just do that inside where the ????? were.

Do you need to turn it on for a little while and then turn it off?

What ever you need to do with the motor you need to do it in place of the ?????.

How do you need the motor to run to kick a ball?
I bet if you wrote the steps down on paper, you could program it.
Give it a try. Write down what the motor has to do and then tranlate that into code.
__________________
Omar
Reply With Quote
  #13   Spotlight this post!  
Unread 15-02-2010, 17:15
Omar's Avatar
Omar Omar is offline
Registered User
no team
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2008
Location: Huntsville, AL
Posts: 122
Omar is a glorious beacon of lightOmar is a glorious beacon of lightOmar is a glorious beacon of lightOmar is a glorious beacon of lightOmar is a glorious beacon of light
Re: How do you wire a Kick motor in labview?

Quote:
Originally Posted by K Lenox View Post
My mentor wanted to acually try if there was a componet to convert 3 digitial inputs and converts it to a decimal value output, which we will use in a case statement to program the robot to run one of three Autonomous Modes.

Kyle Lenox
Yes there is

In the case statement you can set each case to for a range of values like
1..3 or ..-1 or 1..
or for selected values like
1,3,5,7
Attached Thumbnails
Click image for larger version

Name:	Untitled.png
Views:	41
Size:	5.7 KB
ID:	8688  
__________________
Omar

Last edited by Omar : 15-02-2010 at 17:18.
Reply With Quote
  #14   Spotlight this post!  
Unread 15-02-2010, 17:24
Omar's Avatar
Omar Omar is offline
Registered User
no team
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2008
Location: Huntsville, AL
Posts: 122
Omar is a glorious beacon of lightOmar is a glorious beacon of lightOmar is a glorious beacon of lightOmar is a glorious beacon of lightOmar is a glorious beacon of light
Re: How do you wire a Kick motor in labview?

Quote:
Originally Posted by K Lenox View Post
The idea is that we can taggle back and forth between 3 autonomous modes for the three starting areas of the arena. By fliping a switch on a box we can control which Autonomous mode we want running.
Kyle Lenox
Have you looked at the Get Alliance VI?
The Alliance and field position is set on the driver station and can then be read by you code.
Attached Thumbnails
Click image for larger version

Name:	Untitled.png
Views:	28
Size:	2.8 KB
ID:	8689  
__________________
Omar
Reply With Quote
  #15   Spotlight this post!  
Unread 15-02-2010, 17:27
K Lenox's Avatar
K Lenox K Lenox is offline
I AM GOD IN GEARS OF WAR!!!!
FRC #2632 (Comets Unleashed)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2009
Location: Amherst
Posts: 26
K Lenox is an unknown quantity at this point
Re: How do you wire a Kick motor in labview?

Ok heres whats happening.

We are using a motor to pullback a bar, using a dogleg, once it clears the gap, it lets go of the tension and kicks back. Kindof like when you use your foot and bend your knee ato kick something.

What I want to do is build a program where a robot moves forward, kicks a ball, moves forward, kicks a ball, moves forward, kicks a ball. I have it set up so it moves forward, but I dont know if I have it set up right to kick it.

Now, the team want me to devise 3 Autonomous modes. 1 code for each starting position. We can determine which one we want to use by flipping one of three switches on a box to on.

The thing is I dont know how to relate that to programing.

I do know that I have to make 1 of the three I/O true, ant the other two False. Then I need to take the one that is true, and make that ones Autonomous ode pop us and run.

But I dont know how to do that.

RIght now I am work on a possible idea of using elcusive or's to detrmine which one is true. But I would like it to work smoothly and my inexperiance isn't going to help with that. so any help from the pro's is nice

Thx, any help is appreciated
__________________
[font="Times New Roman"]
You never saw this message
You never read this
You will read the next available object within sight



Why are you still reading this???  Begone with you!!!
[SIGPIC]
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
How do you wire the ADXL354 Accelerometer? AustinGra Sensors 4 11-02-2010 23:33
How do you wire a rotating component? alleah2338 Electrical 7 12-02-2009 08:26
How do you wire a limit switch? JMH Electrical 1 16-02-2005 17:44
how to wire the new two motor gearbox Vince lau Electrical 10 14-02-2005 07:30
How do you wire ADXRS150EB gyro? MaxM Electrical 2 16-02-2004 13:43


All times are GMT -5. The time now is 21:58.

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