Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   NI LabVIEW (http://www.chiefdelphi.com/forums/forumdisplay.php?f=182)
-   -   First Programming - Victor/PWM help (http://www.chiefdelphi.com/forums/showthread.php?t=126105)

popnbrown 09-02-2014 01:23

First Programming - Victor/PWM help
 
So as a mentor this is my first step back into working on the control system. Unfortunately, I've been very out of touch with common issues and am having a difficult time diagnosing the issue that my team is having.

We've got a 4-motor powered 6WD, with each of the motors running off of Victor 888s.

Programming-wise we're using the Open 4 Motor vi in Begin to open up 4 motors and we are using the Tank Drive vi that's provided in the library. I should have gotten some screenshots in hindsight but it's a pretty straight-forward program.

By not-working below I mean blinking orange (like a no signal) and working meaning fully responding to the joystick for which it was correctly programmed.

So for a while our issue was that when the PWMs were set to 1,2,3,4 only PWM Channel 3 would work. So I switched the left motors (PWM 1 and PWM 3) and the right front victor (originally PWM 3) worked. However, I was unable to replicate this working with both PWM 1 and PWM 3.

I couldn't get that victor working on PWM 3 or PWM 1 again, so I flipped the PWMs for the right and left side. Then, PWM 3 (which was now on the front right motor) now started to work.

So I changed the PWMs to use 3,4,5,6 to see if it was a PWM Channel issue, but then none of them worked (and they still don't).

I decided to dig deeper into some of the WPI library. Clearly the joysticks were working and that was definitely indicated, and it also looked like the RobotDriveRef set up the 4 motors for the correct PWM Channels. However I was unable to Probe the Set Output vi to see if the value was actually accurately getting set to the right PWM Channel.

One of my leading theories was cables are not set in enough, but I've probably quadrupled checked them, and had two different students also put them in. The fact that two different victors worked and weren't consistent leads me to believe the issue is beyond just fitting wires. I'm semi ruling out bad PWM cables because of the fact that none of them work currently but did before. We also switched out one of the wires and it did not fix anything.

Any tips on how I can debug this or on what may be the problem?

I know this is hard to debug without being present or seeing things so please ask questions, I'll respond as quickly as I can.

My next experiment is going to be to image the cRIO and try this game all over again.

I'm going to have an orange light nightmare tonight.

Zmarken 09-02-2014 01:31

Re: First Programming - Victor/PWM help
 
Quote:

Originally Posted by popnbrown (Post 1339970)
So for a while our issue was that when the PWMs were set to 1,2,3,4 only PWM Channel 3 would work. So I switched the left motors (PWM 1 and PWM 3) and the right front victor (originally PWM 3) worked. However, I was unable to replicate this working with both PWM 1 and PWM 3.

I couldn't get that victor working on PWM 3 or PWM 1 again, so I flipped the PWMs for the right and left side. Then, PWM 3 (which was now on the front right motor) now started to work.

So I changed the PWMs to use 3,4,5,6 to see if it was a PWM Channel issue, but then none of them worked (and they still don't).

In my experience, if only one port is working or if you're having port issues, it's got something to do with the Digital Sidecar. My team had a similar issue, and it turned out to be that the DSC wasn't getting enough power.

So, basic troubleshooting for that would be remove the ribbon cable that connects the Digital Sidecar to the Digital Breakout, and check if all 3 lights are lit (BAT 5V 6V) if they're still lit, then that means you've got good power. If one of them isn't lit, make sure that your DSC is connected correctly to the Power Distribution board as seen here.

That's what I'd start with. Hope it helps

Joe Ross 09-02-2014 01:45

Re: First Programming - Victor/PWM help
 
Getting a PWM cable in the Victor is very difficult and takes the right touch. I suspect that you aren't actually getting it installed fully.

popnbrown 09-02-2014 02:08

Re: First Programming - Victor/PWM help
 
Quote:

Originally Posted by Zmarken (Post 1339974)
So, basic troubleshooting for that would be remove the ribbon cable that connects the Digital Sidecar to the Digital Breakout, and check if all 3 lights are lit (BAT 5V 6V) if they're still lit, then that means you've got good power. If one of them isn't lit, make sure that your DSC is connected correctly to the Power Distribution board as seen

Lights were lit with the ribbon cable in, does taking it out have any effect on these three lights? Shouldn't it only have an effect on the RSL light?



And Joe, yeah I remember messing around with these when I was on FRC. Perhaps we aren't getting them in right. I can feel them get a little resistance and what feels like pins going in, and they dont come out bent or anything. I'll take a close up to compare how far the cable sits into the Victor PWM slot.

Zmarken 09-02-2014 02:14

Re: First Programming - Victor/PWM help
 
Quote:

Originally Posted by popnbrown (Post 1339988)
Lights were lit with the ribbon cable in, does taking it out have any effect on these three lights? Shouldn't it only have an effect on the RSL light?

Some people say that small amounts of power can be transferred through the ribbon cable, enough to have all 3 lights be lit, but when the cable's pulled out, only 2 lights are lit. I haven't had first-hand experience with that though.

Alan Anderson 09-02-2014 12:12

Re: First Programming - Victor/PWM help
 
Quote:

Originally Posted by popnbrown (Post 1339988)
Lights were lit with the ribbon cable in, does taking it out have any effect on these three lights? Shouldn't it only have an effect on the RSL light?

If the Digital Sidecar is properly connected to power, then having the ribbon cable removed should not affect its power LEDs. That's why disconnecting the cable is a good diagnostic for DS power issues.

If the big orange Robot Signal Light is blinking, it usually means battery voltage is getting to the Digital Sidecar okay.

popnbrown 09-02-2014 12:20

Re: First Programming - Victor/PWM help
 
Quote:

Originally Posted by Alan Anderson (Post 1340058)
If the Digital Sidecar is properly connected to power, then having the ribbon cable removed should not affect its power LEDs. That's why disconnecting the cable is a good diagnostic for DS power issues.

If the big orange Robot Signal Light is blinking, it usually means battery voltage is getting to the Digital Sidecar okay.

I'll try to remove it anyways just to double check but the RSL is working as it should for disabled and teleop.

Mr. Lim 09-02-2014 12:29

Re: First Programming - Victor/PWM help
 
Quote:

Originally Posted by Joe Ross (Post 1339981)
Getting a PWM cable in the Victor is very difficult and takes the right touch. I suspect that you aren't actually getting it installed fully.

2nd, 3rd and 4th this.

Even when you inspect the pins on the PWM cables, they may look "straight," but chances are all 3 will be VERY slightly deflected forward or backward. If they are, the next time you plug them in, you're likely to "miss" the connector inside the Victor again. The first thing you need to do is check that all your PWM connector pins are perfectly straight.

If I could teach the "super-straight near-zero insertion force Victor PWM cable connector wiggle technique" through a Chief Delphi post, I'd probably save young FRC teams hundreds of hours of lost troubleshooting time.

The problem is, I could explain it all I want, and even film it in detail. It'll just look like any regular person haphazardly plugging a PWM connector into Victor, when really there is a lot more going on there.

popnbrown 09-02-2014 14:35

Re: First Programming - Victor/PWM help
 
2 Attachment(s)
Here are some pictures. One is of all our PWMs that were connected to the Victors. As far as I can tell it doesn't seem like they're bent. The second one showing how far the PWM is going into the slot on the Victor.

Do these look incorrect?

I'm going to attempt to describe plugging them in, it feels like the pushing the cable goes through two stages. The first is actually finding the holes so you wiggle it a little until you feel that the pins are fitting into their holes. The second is pushing them in further into the holes and there is a little more resistance when pushing them in and it feels like they're getting more secured.

Ether 09-02-2014 14:50

Re: First Programming - Victor/PWM help
 
Quote:

Originally Posted by Mr. Lim (Post 1340066)
If I could teach the "super-straight near-zero insertion force Victor PWM cable connector wiggle technique" through a Chief Delphi post, I'd probably save young FRC teams hundreds of hours of lost troubleshooting time.

Indeed. But if that can't happen, how about we try to spread the word about effective troubleshooting technique?

Is there a step-by-step flow-diagram troubleshooting technique posted somewhere for this particular problem that we could link to whenever this question pops up on CD?



Ether 09-02-2014 15:03

Re: First Programming - Victor/PWM help
 
Quote:

Originally Posted by popnbrown (Post 1340131)
Here are some pictures....


What checks have you done to determine that you are actually delivering a signal to the Victor end of your PWM cable?



popnbrown 09-02-2014 15:11

Re: First Programming - Victor/PWM help
 
Quote:

Originally Posted by Ether (Post 1340143)
What checks have you done to determine that you are actually delivering a signal to the Victor end of your PWM cable?

We've gone through code to ensure we've got the correct PWM Channels being assigned, however we can't probe any of the WPI Libraries deeper (it just won't let us).

As far as hardware, ensure that the Victor and Digital Sidecar are getting power. It's difficult to use a multimeter and see what the readings of the actual PWM cables are but we've tried and it seems as though it's not putting out any power (signal) through the cables.


Other debugging steps have included trying different PWM Channels and PWM Cables, we have yet to try different Victors, but it doesn't seem like a Victor issue.

-Sravan

Ether 09-02-2014 15:13

Re: First Programming - Victor/PWM help
 
Quote:

Originally Posted by popnbrown (Post 1340147)
...

Do you have access to an oscilloscope?



popnbrown 09-02-2014 15:32

Re: First Programming - Victor/PWM help
 
Unfortunately, no.

I just checked with the multimeter again and just poked around (literally) in different ports on the Digital Sidecar. There's 6V from the V+ to the black on the PWM out ports. 0V between Sig and (-). 0v between Pwr and (-). On the Digital IO, however, 5V between Pwr and (-).

Any suggestions Ether in troubleshooting without an oscilloscope?

Ether 09-02-2014 15:35

Re: First Programming - Victor/PWM help
 
Quote:

Originally Posted by popnbrown (Post 1340153)
Any suggestions Ether in troubleshooting without an oscilloscope?

Do you have a known good Talon or Jaguar?

Give it some 12V power and plug your PWM cable into it. See what the LED does.



Ether 09-02-2014 15:39

Re: First Programming - Victor/PWM help
 
Quote:

Originally Posted by popnbrown (Post 1340153)
0V between Sig and (-).

When you are issuing a "full throttle" (forward) PWM command, you should have a duty cycle of approx 20% (2ms pulse divided by 10ms period). So your multimeter should read roughly 1 volt across the white (SIG) and black (return) PWM wires. Use the DC setting and observe proper polarity.



popnbrown 09-02-2014 15:53

Re: First Programming - Victor/PWM help
 
Quote:

Originally Posted by Mr. Lim (Post 1340066)
the "super-straight near-zero insertion force Victor PWM cable connector wiggle technique"

Sorry for wasting all of your time. Turns out after we had it semi-working our first solution was to pull out the cables and we reversed them and didn't put them onto the sidecar the correct way.

So I switched them out and with the robot enabled, I put in the wires into the victor myself, and it's good to go.


Sooooooooooooooooooooo...yeah.....woops.

Thanks for your help, in pretending my insanity was sanity.

popnbrown 09-02-2014 15:54

Re: First Programming - Victor/PWM help
 
Quote:

Originally Posted by Ether (Post 1340157)
When you are issuing a "full throttle" (forward) PWM command, you should have a duty cycle of approx 20% (2ms pulse divided by 10ms period). So your multimeter should read roughly 1 volt across the white (SIG) and black (return) PWM wires. Use the DC setting and observe proper polarity.



Yup...I removed all the PWMs and checked them, it's giving a 0.75 volt reading in neutral. So it's working correctly.


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

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