Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   NI LabVIEW (http://www.chiefdelphi.com/forums/forumdisplay.php?f=182)
-   -   Flat Sequence Problems (http://www.chiefdelphi.com/forums/showthread.php?t=127758)

Darthjawafett 11-03-2014 15:51

Flat Sequence Problems
 
Alright so in autonomous I want a flat sequence of events. Where the robot moves forward stops turns right so that its left side faces the goal and then I want its shooter mechanism to work. I programmed it to do this if it sees the goal is hot and what happened was that it ran all of that code at the same time. I do have wait timers programmed in the sequence but it still runs all of it at once.

mgerber 11-03-2014 15:55

Re: Flat Sequence Problems
 
Could you post a picture of your code?

Darthjawafett 11-03-2014 16:16

Re: Flat Sequence Problems
 

Alan Anderson 11-03-2014 16:38

Re: Flat Sequence Problems
 
Quote:

Originally Posted by Darthjawafett (Post 1357484)
...it still runs all of it at once.

Can you clarify what that means? Your drive motors are being asked to do three different things in sequence. What do they actually do when the code runs? When does your solenoid actually change state?

Mark McLeod 11-03-2014 16:39

Re: Flat Sequence Problems
 
You need to stop the motors in the last frame.

Darthjawafett 11-03-2014 16:43

Re: Flat Sequence Problems
 
Alright so what happens is that when autonomous is run the pistons change state and the motor runs forward while turning at the same exact time. What I want the robot to do is to move forward, then stop, then turn, then stop and when it turns i want the piston to change its state.

Any Suggestions?

Mark McLeod 11-03-2014 16:50

Re: Flat Sequence Problems
 
Does your Telop driving code work properly?
Could we see that to compare?

Are your speed controllers wired the same on both sides of the robot, or is the wiring reversed on one side?

Did you invert the motors in Begin?

Alan Anderson 11-03-2014 16:57

Re: Flat Sequence Problems
 
I don't understand what "motor runs forward while turning" is describing. Is it only one of your drive motors that is misbehaving? Try telling us what your drive wheels are doing.


Does anything in Periodic Tasks also control your drive motors and/or the solenoid?


How is everything defined in Begin? It might help to show us that code too. [A static screen capture is less useful than the actual code -- there is a wire coming into your sequence that runs somewhere we can't follow it, for example. You can select the relevant part of the vi and save it as a vi snippet (from the Edit menu), making a .png file that you can upload as a picture but which we can also run in LabVIEW in order to inspect it more closely.]


What exactly are you doing in order to run autonomous mode? Please be as detailed and specific as you can.

Darthjawafett 11-03-2014 17:02

Re: Flat Sequence Problems
 
Teleop is working properly


And the Begin Vi where one motor is inverted to have the robot drive forward when both have the same value.

Greg McKaskle 11-03-2014 17:30

Re: Flat Sequence Problems
 
Your wait values are large enough that you can practically turn on execution highlighting and run your code from the run button with the diagram open.

Greg McKaskle

Darthjawafett 11-03-2014 18:43

Re: Flat Sequence Problems
 
Here is my google drive with all of the files related to the project. For those who requested it
https://drive.google.com/#folders/0B...DJMLW04Y0w0Wmc

mgerber 11-03-2014 22:29

Re: Flat Sequence Problems
 
The first frame has a delay of 200ms, or .2 seconds. Is it possible that the frame is executing too quickly for you to see? That could explain why it seems to start turning instantly.

Darthjawafett 11-03-2014 22:47

Re: Flat Sequence Problems
 
Possibly, but when it was at 1000 ms as its wait timer and it still had the same result. I think the most its wait timer was set to was 2000 ms

Alan Anderson 12-03-2014 02:59

Re: Flat Sequence Problems
 
Quote:

Originally Posted by Darthjawafett (Post 1357629)
Here is my google drive...

It looks like you haven't given anyone else permission to view that folder.



Looking at the screen shots, I don't see anything in your teleop that controls your drive motors. That was the part that Mark wanted to compare against your autonomous code.

Again, might you have anything in Periodic Tasks that could be interfering with the drive and solenoid outputs?

This isn't very relevant, but I'm also a little curious about your drivebase mechanical setup. It seems unusual to me that it's the left motor you have inverted.

Darthjawafett 12-03-2014 03:49

Flat Sequence Problems
 
I've edited my permissions on Google Drive so now you can check the project itself. The way our build team sets up the motors one usually faces the other way from the other motor so I have to invert one so that if both joysticks are moved forward the robot also moves forward

Greg McKaskle 12-03-2014 08:12

Re: Flat Sequence Problems
 
My suggestion would be to run RobotMain using the run button. I wonder if the code you are observing is actually the code you posted. I would also wonder if the motor controllers for the drive train are set to coast or brake. I would think that the 200ms full speed bump at the beginning would barely move most robots. When I've helped most teams with auto, it is more like two seconds of 75% motors in order to cross the line.

Greg McKaskle

Alan Anderson 12-03-2014 09:30

Re: Flat Sequence Problems
 
Quote:

Originally Posted by Greg McKaskle (Post 1357967)
I wonder if the code you are observing is actually the code you posted.

The name of the project (2014Robot0n2013chasis) suggests that you might have copied the project from another folder. When you do that, you usually need to go into the properties of the FRC Robot Boot-up Deployment and modify the Local destination directory to match where the project resides.

The code you're showing us doesn't have any obvious issues that would cause the symptoms you're describing. How are you putting the code on the robot? Again, what exactly are you doing in order to run autonomous mode? Please be as detailed and specific as you can.

Darthjawafett 12-03-2014 09:45

To put the code onto the robot we connect our programming laptop to the crio then we build our code and deploy it. To run the code our driving laptop connects and runs autonomous mode from the driver station. The name means that it's our shooting robots code but for testing purposes it is being used on our climbing robot from last year

Greg McKaskle 12-03-2014 10:17

Re: Flat Sequence Problems
 
Rereading the description you posted, here is what I think is happening.

Auto starts, the robot hardly twitches, waits two seconds, then starts driving in an arc and shooting. If you don't hear the field sounds and know exactly when auto starts, if you don't see the twitch and assume that auto starts when the robot moves, then I believe that would match your description.

I believe that the code you show will do what you want when you make the initial duration longer. Try 1500 or 2000 forward, then the rest of the code. As another debugging technique, have someone drive the auto while someone else records with a phone's video. Review the video and write down the recipe. I think you'll see that the forward needs to be more than 1/5 of a second. I don't know that you need 2 seconds for the ball to settle. And as mentioned, you should set the motors to 0 at the end. You have disabled motor safety, so the robot will continue driving in an arc until auto ends.

Hope this helps.

Greg McKaskle

Darthjawafett 12-03-2014 10:36

Alright so thanks to everyone for their help and suggestions. The problem has finally been resolved and we are ready for our Albany competition

Alan Anderson 12-03-2014 11:42

Re: Flat Sequence Problems
 
Would you mind telling us what you did to fix it?

Darthjawafett 12-03-2014 19:38

Re: Flat Sequence Problems
 
I kept changing around the timed intervals for the first drive command and, it began working as I wanted it too. I also added the brake for the motors in the last frame.

After that change was made, it followed its given instruction in the sequence like we wanted it too.


All times are GMT -5. The time now is 20:18.

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