![]() |
Re: Limit Swtich Help
Quote:
When you press button 1, spike1 goes in reverse and spike2 goes to kOn? When you press button 4, which spike goes to kForward: spike1 or spike2? What does the other do? Whichever goes to kForward, are you saying that it is now stuck in the kForward state no matter which buttons you push? When you say yellow, is that possibly orange? The manual says that the possible colors are red, green, and orange. Do you see all three of those colors and a yellow? In addition to checking the orientation of the PWM cable, check the power leads (both into the spikes and then out of the spikes) so that you are correctly getting power to power and ground to ground. |
Re: Limit Swtich Help
Quote:
|
Re: Limit Swtich Help
This is really sounding like a wiring issue, it's definitely not something in the code you posted. Can you post a pic of your wiring?
|
Re: Limit Swtich Help
Quote:
|
Re: Limit Swtich Help
I agree 100% with Jon...you construct the two objects in the same way (so they should default to the same settings) and you call the same methods on the objects under the same conditions. When you look at the wires, check all power inputs and outputs as well as the PWM wires. I hate to be a software guy that blames the hardware, but...
|
Re: Limit Swtich Help
Quote:
|
Re: Limit Swtich Help
Quote:
|
Re: Limit Swtich Help
Quote:
|
Re: Limit Swtich Help
I have one final question, I noticed that when my victors are set in reverse and I press the limit switch the victors don't stop very well. Is there anyway to fix this or is it fine the way it is. Here's the code
Code:
public void operatorControl() { |
Re: Limit Swtich Help
Quote:
|
Re: Limit Swtich Help
Quote:
|
Re: Limit Swtich Help
Quote:
Type "Victor" into the search box. Click on the link for Victor888 (or SP). Find the link for the user manual and click on it. Search for "brake". Follow the instructions you find there. |
Re: Limit Swtich Help
Quote:
|
Re: Limit Swtich Help
Quote:
|
Re: Limit Swtich Help
While the brake setting will help, it may not be your issue. It depends on what, exactly, the behavior is.
Take a look at this portion of the code: Code:
if(limitPressed || limitPressed2 == false || limitPressed3 == false || limitPressed4 == false) {There are two if/else blocks here. The first one controls going up, the second going down, I assume. However, your limit switch at the bottom of the lead screw is being checked in the first if statement. What this may be doing is telling your motors to stop in the first if statement, then in the second telling them to go down. So you end up with a fast oscillation between stop and down. When I'm working with a motor, I try to combine all control of the motor into a single if/else block, or in a single set command, just to make sure I don't get into a situation where I'm telling it two different things every loop through. For this situation, I might do something like: Code:
if (operator says to go up AND I haven't hit the top limit switch yet)Also, check the third and fourth limit switches... your comments say they are for controlling left to right motion of the gripper, but in your code they're set up to work with the up/down motion of the elevator. Are you controlling the left/right motion with the relays? If so, you'll want to work those into the if/else block that deals with the relays! |
| All times are GMT -5. The time now is 11:13. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi