Chief Delphi

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

xXhunter47Xx 12-02-2014 23:24

Window Motor problem
 
We are trying to have two window motors attached to one victor run when a limit switch is not pressed. The window motors are not running no matter what position the switch is in. We're trying to have it run in periodic tasks.
Here's our labview program.
Begin.vi

This is our switch init


This is our victor init

Periodic Tasks.vi

This is where we want the window motors to run. In the "false" part of the case structure, the constant is 0.

Any help is appreciated. Thanks!

Greg McKaskle 13-02-2014 07:10

Re: Window Motor problem
 
Do you have errors showing up in the diagnostics windows that help?

What value is the limit switch if you probe the wire? If you probe the value going into the motor? This will help identify whether it is a SW or HW/Electrical issue.

Also, if you put the robot into Test mode, you can scroll to find the Pullback motor. You can see the value that periodic updated with. You can also set the value yourself if you want to run the motor a bit. Keep in mind that unless your code reads the robot mode, periodic loops tend to operate even in test mode, so the interactive motor set features may be overwritten by periodic.

Greg McKaskle

Ether 13-02-2014 08:39

Re: Window Motor problem
 
Quote:

Originally Posted by Greg McKaskle (Post 1342273)
What value is ... going into the motor? This will help identify whether it is a SW or HW/Electrical issue.

If a HW issue is indicated, you can use a digital voltmeter to measure the signal on the PWM cable going into the Victor*. If you have a signal, and the Victor is not responding, you may have the PWM connector plugged into the Vic improperly. This is a common problem.

* ask for more detail if you want to pursue this


Mark McLeod 13-02-2014 08:56

Re: Window Motor problem
 
The Periodic Task code must be placed inside an infinite loop (with a suitable delay timer).

What you show will be executed only once in the first few milliseconds that your code is executing, and will never be checked again.

Ether 13-02-2014 09:00

Re: Window Motor problem
 

A bit off-topic, but... It appears from your code that you are calling the Window motors "Pullback" motors. Are you using Windows motors to pull back your catapult arm?



xXhunter47Xx 13-02-2014 18:06

Re: Window Motor problem
 
Quote:

Originally Posted by Ether (Post 1342312)

A bit off-topic, but... It appears from your code that you are calling the Window motors "Pullback" motors. Are you using Windows motors to pull back your catapult arm?



Confidential. But yes, we are using it to pull back the catapult. We have a custom CNC dog ear mech attached to 2 window motors. I can get you pictures once the robot is done if you'd like.

@Mark
Okay, that sounds about right. I'll place it in a loop and see what happens. Give me about 20 minutes. Thanks!

Ether 13-02-2014 18:18

Re: Window Motor problem
 
Quote:

Originally Posted by xXhunter47Xx (Post 1342723)
yes, we are using it to pull back the catapult.

I was just wondering because the window motors are very low power.



DonRotolo 13-02-2014 19:12

Re: Window Motor problem
 
Quote:

Originally Posted by Ether (Post 1342728)
I was just wondering because the window motors are very low power.

Ah, but they're using two! :rolleyes:

I can imagine a mechanism that resets a catapult not needing to operate faster than, say, 10 seconds. In such a (hypothetical) case, two such motors sound sufficient. Not ideal or recommended, but sufficient.

xXhunter47Xx 13-02-2014 20:15

Re: Window Motor problem
 
It runs fast enough. Don't worry about that :P. It's supposed to automagically roll the arm once teleop is enabled. And I got it to work by putting it in a while loop.

After doing that though, the pressure switch isn't sending signal to the DSCar to turn on the compressor. It worked before I implemented the window motors but now it doesn't work. Labview says that I don't have to run the control loop in a while loop as well because that's just redundant, but could that be the case?

Greg McKaskle 14-02-2014 07:31

Re: Window Motor problem
 
If you open the compressor control subVI, by double clicking, you will see that it already contains a loop that runs as long as there is a compressor opened that needs to be controlled.

Please check that the compressor is opened in Begin and registered by name. This will also allow you to use Test mode to see the value of the compressor pressure switch and spike. This will help verify what channels the code is using and what it is commanding. If the SW is doing the right things and the robot is enabled, you may want to check the electrical side of things.

Greg McKaskle


All times are GMT -5. The time now is 09:56.

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