Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   NI LabVIEW (http://www.chiefdelphi.com/forums/forumdisplay.php?f=182)
-   -   [Request]Help with Basic Design of Program (http://www.chiefdelphi.com/forums/showthread.php?t=133661)

Nickalahoby 29-01-2015 16:30

[Request]Help with Basic Design of Program
 
Hi, this is my first time posting here, and my first time using these forums, first time using Labview, first time making a program for Labview FRC, and First time being on FIRST. Just to give you an understanding of what I already know; I can understand the basics of how Labview works, with the Vi's and wiring. However, I'm not entirely sure how the Vi's need to be wired together or what needs to be included in a program for it to be a completed function for the robot to utilize.

My first question concerns the drive system my team has decided to use(Tank Drive). We have a 3 wheeled chassis with no special wheels and are using 4 motors for it. So, is the example program for Tank drive usable on its own? I would assume it requires some slight modifications, per say the motor controllers, or what inputs we have such as USB ports. But in whole, are there any major modifications that would need to happen for the base Tank Drive VI to be usable? Also, a slight follow up question; would it be considered illegal to just straight up use the Tank drive sample program?

Second question concerns our only other function, which is a basic pulley lift with one motor. Essentially a positive rotation of the motor would result in the lift moving up, and a negative spin results in a descent. Furthermore, would the program needed to construct a more simple system like this require such a detailed program as how the Tank Drive VI looks?

If anymore details are required, I would be more than happy to give them. If I'm asking a bit too much or asking something wrong, I apologize; being that this is my first year, and my team's first year, I'm not too sure of much of anything.

Thanks in advance!

wt200999 29-01-2015 17:14

Re: [Request]Help with Basic Design of Program
 
Quote:

Originally Posted by Nickalahoby (Post 1435765)
We have a 3 wheeled chassis with no special wheels and are using 4 motors for it.

Do you mean three wheels on each side of the chassis, with each side independently controlled with two motors each?

Quote:

Originally Posted by Nickalahoby (Post 1435765)
So, is the example program for Tank drive usable on its own? I would assume it requires some slight modifications, per say the motor controllers, or what inputs we have such as USB ports. But in whole, are there any major modifications that would need to happen for the base Tank Drive VI to be usable? Also, a slight follow up question; would it be considered illegal to just straight up use the Tank drive sample program?

It is legal to use this as is. The default example is written for two motor drive (this is defined in Begin.vi).

Here are two options to get that code up and running with your system
  1. Use two PWM ports, PWM 0 for one side, and PWM 1 for the other and use a Y splitter to each motor controller
  2. Switch out the "Open2MotorDrive" with "Open4MotorDrive" and configure it to match the wiring and configuration of your bot

The example also uses a one joystick arcade mode, if you want to customize that you will need to modify which function is called.

Quote:

Originally Posted by Nickalahoby (Post 1435765)
Second question concerns our only other function, which is a basic pulley lift with one motor. Essentially a positive rotation of the motor would result in the lift moving up, and a negative spin results in a descent. Furthermore, would the program needed to construct a more simple system like this require such a detailed program as how the Tank Drive VI looks?

It will depend entirely on how you want to control it. Does a simple joystick axis suffice? Do you want a button for up/down? Do you want to have pre-defined positions for the pulley system? Will you have a sensor on the pulley somewhere? Do you need to control the speed? Will you have limits in place to prevent damage?

How complex your code is will depend on how you want to implement it.

Nickalahoby 29-01-2015 17:25

Re: [Request]Help with Basic Design of Program
 
Our chassis is 3 wheels on each side with 2 motors controlling each side, so 6 wheels total, and 4 motors total. Didn't realize I kinda half clarified that.

And our lift system is going to be controlled by 2 buttons, with Button "A" making the lift system go up at a specified rate, and Button "B" makes the lift descend at a specified rate. So in essence, we have 2 inputs controlling the output of one motor, one causing a negative turn, the other a positive turn.

Thanks for the clarification on the other parts I addressed as well.

Alan Anderson 29-01-2015 19:46

Re: [Request]Help with Basic Design of Program
 
Quote:

Originally Posted by Nickalahoby (Post 1435765)
...would it be considered illegal to just straight up use the Tank drive sample program?

It's legal, but it's not a good idea. The example code is missing most of the features that communicate with the Field Management System, and it won't be sending useful diagnostic data to the Dashboard.

What you really ought to do is to replace the Arcade Drive block in the Teleop vi with a Tank Drive block. You'll need to add the second Joystick Open to the Begin vi, and the second Joystick Get Values to Teleop, using what's inside the example's While loop as a guide.

tcjinaz 30-01-2015 23:36

Re: [Request]Help with Basic Design of Program
 
Quote:

Originally Posted by Nickalahoby (Post 1435765)
Hi, this is my first time posting here, and my first time using these forums, first time using Labview, first time making a program for Labview FRC, and First time being on FIRST. Just to give you an understanding of what I already know; I can understand the basics of how Labview works, with the Vi's and wiring. However, I'm not entirely sure how the Vi's need to be wired together or what needs to be included in a program for it to be a completed function for the robot to utilize.

My first question concerns the drive system my team has decided to use(Tank Drive). We have a 3 wheeled chassis with no special wheels and are using 4 motors for it. So, is the example program for Tank drive usable on its own? I would assume it requires some slight modifications, per say the motor controllers, or what inputs we have such as USB ports. But in whole, are there any major modifications that would need to happen for the base Tank Drive VI to be usable? Also, a slight follow up question; would it be considered illegal to just straight up use the Tank drive sample program?

Second question concerns our only other function, which is a basic pulley lift with one motor. Essentially a positive rotation of the motor would result in the lift moving up, and a negative spin results in a descent. Furthermore, would the program needed to construct a more simple system like this require such a detailed program as how the Tank Drive VI looks?

If anymore details are required, I would be more than happy to give them. If I'm asking a bit too much or asking something wrong, I apologize; being that this is my first year, and my team's first year, I'm not too sure of much of anything.

Thanks in advance!


Here's your plan:
ScreenSteps: https://wpilib.screenstepslive.com/s/4485
https://wpilib.screenstepslive.com/s...p-test-program

FIRST, NI, and WPI have handed you a working robot (THANKS TO YOU ALL). Work through the tutorials. After step 6 in tutorial 4, you have a working arcade drive robot. Keep burningthrough the tutorials and you will be able to set up tank drive, and other, more dangerous :) things.

Start NOW and don't slow down. Read ScreenSteps at every opportunity, and search Chief Delphi for anything. It will probably be there.

Good Luck and Have Fun!
Tim


All times are GMT -5. The time now is 08:48.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi