Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   NI LabVIEW (http://www.chiefdelphi.com/forums/forumdisplay.php?f=182)
-   -   Motor Control issues (http://www.chiefdelphi.com/forums/showthread.php?t=133089)

Jack Gillespie 17-01-2015 19:02

Motor Control issues
 
We have gone through the tutorials, code deployed, Camera is working, joysticks working on the Dashboard, Motors don't run. Get the following error message: 44061 Occurred at "left and right motors in the VI path: Robot Main.VI. We are trying to run the sample arcade program given in Labview.

Greg McKaskle 17-01-2015 20:40

Re: Motor Control issues
 
Have you enabled the DS? What do the motor controller LEDs look like?

Greg McKaskle

Jack Gillespie 17-01-2015 21:56

Re: Motor Control issues
 
The Driver Station is Enabled. The Talon LED's are on solid and not blinking

Greg McKaskle 18-01-2015 08:07

Re: Motor Control issues
 
Those are good signs.

When you press the joystick forward, does the LED on the motor controller start to blink? Does the blink rate correspond to the power being requested? If not, I'd check the code to see what value is being sent to the motor controller. It should be between -1 and 1 inclusive. Also, how often is it being sent? If it is sent and the code then spends a long time doing something else, the RobotDrive Safety mechanism will set the motors back to 0 after 100ms. From your description, it sounds like the first issue.

One other thing to check is that the PWM cables look "right", black on the outside of the roboRIO and built correctly with the same colors in the same position on both ends.

Greg McKaskle

Jack Gillespie 18-01-2015 09:14

Re: Motor Control issues
 
I will check this morning on the roboRio side for the PWM cables, but I believe they are correct. I know they are correct on the Talon side. I will also check continuity of the PWM's. When we move the joysticks movement shows in the Driver Station. No change of any kind on the talons As soon as I get to school I will upload a photo of the code.

Thanks for all of your time

Jack Gillespie 18-01-2015 15:33

Re: Motor Control issues
 
We have checked the PWM cables both for polarity and contitnuity.
We have checked the PWM settings in the code We are using the default code in Labview

ozrien 18-01-2015 16:10

Re: Motor Control issues
 
If the Talon Sr LEDs are solid orange, then they are being commanded to go to neutral. That suggests either the joystick is in the wrong slot (remember they start at zero this year, not one) or some other logic issue in the robot code.

Try to just create a simple app that drives the Talon. That should help narrow down the problem. If it works then work out the differences. If it does not work try focus on that.

Alan Anderson 18-01-2015 20:48

Re: Motor Control issues
 
Have you made any changes to the default program?

How are you running the code on the robot?

Greg McKaskle 18-01-2015 21:43

Re: Motor Control issues
 
If you open TeleOp and probe the numbers coming from the joystick, what do you get? Next you can see the values from the RobotDrive that is being sent to SmartDashboard. So what are those values? I suspect they are zeroes, and the next quest will be to figure out why.

Greg McKaskle

Jack Gillespie 19-01-2015 00:19

Re: Motor Control issues
 
Finally solved the problem, pulled up the example Arcade VI, notice the while loop, added a while loop the default project. Changed the Joystick in the USB setting of the Driver station and suddenly it all worked. Now we just have to figure out was it the DS setting or the while loop or both that solved the problem. We now have reliable camera and drive on our Proto-board. Now the Programmers can really start to work.:D

Alan Anderson 19-01-2015 01:10

Re: Motor Control issues
 
It was the joystick. Before you moved it to where the program expected it, the program was looking for values from a joystick that didn't exist.

I don't know where you put the While, but you should probably take it back out. It certainly doesn't belong in Teleop.

Jack Gillespie 22-01-2015 13:50

Re: Motor Control issues
 
1 Attachment(s)
Ok, the kids got the mockup board working in Arcade Drive.
They have been trying to set up tank drive. When the try it out one joystick will work driving one motor on the x-axes, and the other motor on the y-axes.
I have attached the teleop code they created. What are we doing wrong?:confused:

Alan Anderson 22-01-2015 14:30

Re: Motor Control issues
 
One of the joystick RefNum Get functions is actually a RefNum Set. That's a problem.

ProgrammerJuan 22-01-2015 15:38

Re: Motor Control issues
 
Hello Alan I'm Juan one of the programmers for Team 5430 and i have changed the joystick set to joystick get. There are two problems the joysticks are being read but there is no output, and its only reading one joystick so that one joystick runs two motors. We would love to receive your opinion on this problem.

Alan Anderson 22-01-2015 16:31

Re: Motor Control issues
 
I need to see Begin.vi in order to know where to focus on next. It sounds like you might not be opening or naming the joysticks the way you think you are.

Jack Gillespie 22-01-2015 16:57

Re: Motor Control issues
 
1 Attachment(s)
Here is the Begin VI

Alan Anderson 22-01-2015 17:16

Re: Motor Control issues
 
Nothing jumps out at me as being wrong. Are you certain you're running the program with the corrected RefNum Get?

Jack Gillespie 22-01-2015 18:00

Re: Motor Control issues
 
I will check it again but I think we have it right.
When the students look at the Begin VI and open Joystick open VI for joystick 0, or Joystick 1 both VI's have exactly the same settings including when we open the joystick open vi block diagram.
The same true when they look at the joystick set VI's

That does not seem right to me

Mark McLeod 22-01-2015 18:29

Re: Motor Control issues
 
Are there any error messages on the Driver Station in the window on the right?

I know you've found the Driver Station USB tab, but recheck the Driver Station USB tab to see where the joysticks are.
Make sure they are listed next to USB 0 and USB 1.
Click on each joystick listed on the Driver Station tab to test the axis feedback on the Dashboard.

Jack Gillespie 22-01-2015 19:03

Re: Motor Control issues
 
We have checked the USB settings on the DS.
The error message is "FRC: An invalid set operation occurred, and the PWM channel was not allocated" But I have double checked the Begin VI multiple times using context help to make sure the joystick and motor vi's are Joystick and motor set refnum vi's

Thanks everyone, this is driving us nuts
Jack Gillespie

Mark McLeod 22-01-2015 19:22

Re: Motor Control issues
 
One of your Set vi's is wrong then, according to the error message.

Can you .zip your project and post that?
It's in your Documents folder under the LabVIEW data folder.
If you don't have zip then post just the Begin & Teleop vi's by adding a ".txt" file extension to fool CD.

Jack Gillespie 22-01-2015 19:51

Re: Motor Control issues
 
2 Attachment(s)
I have attached the Teleop and Begin VI's
I zipped the whole project and it exceeded the 5MB limit.

Jack Gillespie 23-01-2015 19:12

Re: Motor Control issues
 
Thank you one and all, we are not sure how we fixed the problem, but we did.
We ended up starting all over from scratch and it worked.
We never did find our error. But the students are now moving on to pneumatics

:D

Alan Anderson 24-01-2015 09:21

Re: Motor Control issues
 
I finally got the chance to look at your Teleop. The problem with it was kind of amusing. You were closing your joysticks and drive motors as soon as you used them, so the next time through Teleop they weren't open anymore and the RefNum Get couldn't find what it's looking for.

I can't think of a good reason to use a Close anywhere except in Finish. Even there, it's not really necessary, because Finish never actually runs in normal use.

icq10 24-01-2015 14:14

Re: Motor Control issues
 
Quote:

Originally Posted by Jack Gillespie (Post 1432228)
Ok, the kids got the mockup board working in Arcade Drive.
They have been trying to set up tank drive. When the try it out one joystick will work driving one motor on the x-axes, and the other motor on the y-axes.
I have attached the teleop code they created. What are we doing wrong?:confused:

Is this just a simple motor test program or are you about to use tank drive mode on your robot?


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

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