Go to Post Intent is determined by those that are doing, not those that are watching. - meaubry [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 01-27-2014, 04:12 PM
DuncanCS DuncanCS is offline
Registered User
FRC #5221
 
Join Date: Jan 2014
Location: Windsor
Posts: 2
DuncanCS is an unknown quantity at this point
Dig-Sidecar only one output at a time

Hi everyone,

We're having problems controlling two motors at the same time. I have two motors connected to Victor888 controllers connected to PWM outputs #1 and 2 on the digital sidecar. I send commands to run both motors at the same time at the same rate, but only the 1st motor runs (port 1 on the sidecar). The 2nd motor doesn't run and there is no voltage drop across the terminal of the motor.

NOW, if I pull the wire out of port 1 of the sidecar and run the program again, the 2nd motor works! I've tried using two different ports (#4 and #6) and the same problem occurs. It certainly seems that only 1 PWM port at a time can be used on the digital sidecar.

Here's 2 different versions of my Java code that produce the same problem:

-------------------------------------------------
Victor m1 = new Victor(1);
Victor m2 = new Victor(2);

In autonomous:
m1.set(0.5);
m2.set(0.5);
Timer.delay(2.0);
m1.set(0.0);
m2.set(0.0);
--------------------------------------------------
Other version:

RobotDrive chassis = new RobotDrive(1,2);

In autonomous:
chassis.setSafetyEnabled(false);
chassis.drive(0.5, 0.5);
Timer.delay(2.0);
chassis.drive(0.0, 0.0);
--------------------------------------------------
Thanks in advance for any help.

BD Team 5221
Reply With Quote
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 08:34 AM.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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