Go to Post I did research before asking a question on CD..blasphemous I know - rachelholladay [more]
Home
Go Back   Chief Delphi > Other > FIRST Tech Challenge
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 16-03-2014, 19:05
andidani andidani is offline
Registered User
FTC #4970
 
Join Date: Sep 2012
Location: United States
Posts: 3
andidani is an unknown quantity at this point
[FTC]: Servo daisy chain problem

Hi, my team just finished rewiring our robot, and in the process we rearranged the setup of our motors and servos. Before now, things have always functioned quite well, but as soon as we changed the servo controller to 3rd in the daisy chain, the servo was no longer recognized as a servo in the pragmas. Below is the setup, with the "ploop" servo refusing to turn brown after compiling:
#pragma config(Sensor, S2, gyro, sensorI2CHiTechnicGyro)
#pragma config(Sensor, S3, HTSMUX, sensorI2CCustom)
#pragma config(Sensor, S4, , sensorI2CMuxController)
#pragma config(Motor, motorA, bristle, tmotorNXT, PIDControl, encoder)
#pragma config(Motor, mtr_S1_C1_1, liftLeft, tmotorTetrix, openLoop, reversed)
#pragma config(Motor, mtr_S1_C1_2, backLeft, tmotorTetrix, openLoop, reversed, encoder)
#pragma config(Motor, mtr_S1_C2_1, frontLeft, tmotorTetrix, openLoop, reversed, encoder)
#pragma config(Motor, mtr_S1_C2_2, flagRaiser, tmotorTetrix, openLoop)
#pragma config(Motor, mtr_S4_C1_1, liftRight, tmotorTetrix, openLoop, reversed, encoder)
#pragma config(Motor, mtr_S4_C1_2, frontRight, tmotorTetrix, openLoop)
#pragma config(Motor, mtr_S4_C2_1, backRight, tmotorTetrix, openLoop, encoder)
#pragma config(Motor, mtr_S4_C2_2, dropper, tmotorTetrix, openLoop)
#pragma config(Servo, srvo_S4_C3_1, ploop, tServoStandard)
#pragma config(Servo, srvo_S4_C3_2, servo2, tServoNone)
#pragma config(Servo, srvo_S4_C3_3, servo3, tServoNone)
#pragma config(Servo, srvo_S4_C3_4, servo4, tServoNone)
#pragma config(Servo, srvo_S4_C3_5, servo5, tServoNone)
#pragma config(Servo, srvo_S4_C3_6, servo6, tServoNone)
Has anyone else had an issue with the servo controller when not placed first in the chain?
Reply With Quote
  #2   Spotlight this post!  
Unread 17-03-2014, 11:31
dcribbs dcribbs is offline
Registered User
AKA: Dave Cribbs
FTC #5598 (Parish Robotics)
Team Role: Coach
 
Join Date: Mar 2009
Rookie Year: 2004
Location: Denton, TX
Posts: 35
dcribbs has a spectacular aura aboutdcribbs has a spectacular aura about
Re: [FTC]: Servo daisy chain problem

Quote:
#pragma config(Sensor, S4, , sensorI2CMuxController)
It looks like you are configuring S4 as a Sensor here


Quote:
#pragma config(Motor, mtr_S4_C1_1, liftRight, tmotorTetrix, openLoop, reversed, encoder)
#pragma config(Motor, mtr_S4_C1_2, frontRight, tmotorTetrix, openLoop)
#pragma config(Motor, mtr_S4_C2_1, backRight, tmotorTetrix, openLoop, encoder)
#pragma config(Motor, mtr_S4_C2_2, dropper, tmotorTetrix, openLoop)
#pragma config(Servo, srvo_S4_C3_1, ploop, tServoStandard)
#pragma config(Servo, srvo_S4_C3_2, servo2, tServoNone)
#pragma config(Servo, srvo_S4_C3_3, servo3, tServoNone)
#pragma config(Servo, srvo_S4_C3_4, servo4, tServoNone)
#pragma config(Servo, srvo_S4_C3_5, servo5, tServoNone)
#pragma config(Servo, srvo_S4_C3_6, servo6, tServoNone)
and here you are trying to use S4 as a motor/servo controller.
I am not sure, but I don't think the S4 port can do both at the same time.
__________________
Dave Cribbs
Coach & Teacher

FTC - Team 5598, 6635, 6795
FRC - Team 3626
Reply With Quote
  #3   Spotlight this post!  
Unread 17-03-2014, 12:12
FTC4211's Avatar
FTC4211 FTC4211 is offline
Registered User
AKA: John Stegeman
FTC #4211 (The Bombers)
Team Role: Programmer
 
Join Date: Jan 2014
Rookie Year: 2010
Location: Missouri
Posts: 11
FTC4211 is an unknown quantity at this point
Re: [FTC]: Servo daisy chain problem

I think the problem is that RobotC didn't add in the necessary pragmas to have controllers on the ports S1, and S4.

This should work:

Code:
#pragma config(Hubs,  S1, HTMotor,  HTMotor,  none,     none)
#pragma config(Hubs,  S4, HTMotor,  HTMotor,  HTServo,  none)
#pragma config(Sensor, S1,     ,               sensorI2CMuxController)
#pragma config(Sensor, S2,     gyro,           sensorI2CHiTechnicGyro)
#pragma config(Sensor, S3,     HTSMUX,         sensorI2CCustom)
#pragma config(Sensor, S4,     ,               sensorI2CMuxController)
#pragma config(Motor,  motorA,          bristle,       tmotorNXT, PIDControl, encoder)
#pragma config(Motor,  mtr_S1_C1_1,     liftLeft,      tmotorTetrix, openLoop, reversed)
#pragma config(Motor,  mtr_S1_C1_2,     backLeft,      tmotorTetrix, openLoop, reversed, encoder)
#pragma config(Motor,  mtr_S1_C2_1,     frontLeft,     tmotorTetrix, openLoop, reversed, encoder)
#pragma config(Motor,  mtr_S1_C2_2,     flagRaiser,    tmotorTetrix, openLoop)
#pragma config(Motor,  mtr_S4_C1_1,     liftRight,     tmotorTetrix, openLoop, reversed, encoder)
#pragma config(Motor,  mtr_S4_C1_2,     frontRight,    tmotorTetrix, openLoop)
#pragma config(Motor,  mtr_S4_C2_1,     backRight,     tmotorTetrix, openLoop, encoder)
#pragma config(Motor,  mtr_S4_C2_2,     dropper,       tmotorTetrix, openLoop)
#pragma config(Servo,  srvo_S4_C3_1,    ploop,                tServoStandard)
#pragma config(Servo,  srvo_S4_C3_2,    servo2,               tServoNone)
#pragma config(Servo,  srvo_S4_C3_3,    servo3,               tServoNone)
#pragma config(Servo,  srvo_S4_C3_4,    servo4,               tServoNone)
#pragma config(Servo,  srvo_S4_C3_5,    servo5,               tServoNone)
#pragma config(Servo,  srvo_S4_C3_6,    servo6,               tServoNone)
//*!!Code automatically generated by 'ROBOTC' configuration wizard               !!*//
Reply With Quote
  #4   Spotlight this post!  
Unread 19-03-2014, 14:58
dcribbs dcribbs is offline
Registered User
AKA: Dave Cribbs
FTC #5598 (Parish Robotics)
Team Role: Coach
 
Join Date: Mar 2009
Rookie Year: 2004
Location: Denton, TX
Posts: 35
dcribbs has a spectacular aura aboutdcribbs has a spectacular aura about
Re: [FTC]: Servo daisy chain problem

Quote:
#pragma config(Hubs, S1, HTMotor, HTMotor, none, none)
#pragma config(Hubs, S4, HTMotor, HTMotor, HTServo, none)
#pragma config(Sensor, S1, , sensorI2CMuxController)
#pragma config(Sensor, S2, gyro, sensorI2CHiTechnicGyro)
#pragma config(Sensor, S3, HTSMUX, sensorI2CCustom)
#pragma config(Sensor, S4, , sensorI2CMuxController)
Did your program work with S1 and S4 both defined as a Hub and a Sensor.

I did not think that was possible. When I used the motor and sensor setup tab it gave me an error when I tried to define a sensor port (S4) as 2 different things.
Attached Thumbnails
Click image for larger version

Name:	RobotC error.png
Views:	13
Size:	270.4 KB
ID:	16604  
__________________
Dave Cribbs
Coach & Teacher

FTC - Team 5598, 6635, 6795
FRC - Team 3626
Reply With Quote
  #5   Spotlight this post!  
Unread 24-03-2014, 20:11
andidani andidani is offline
Registered User
FTC #4970
 
Join Date: Sep 2012
Location: United States
Posts: 3
andidani is an unknown quantity at this point
Re: [FTC]: Servo daisy chain problem

Thanks for the responses, everyone. In the time since I first posted, I found an odd peculiarity with robotc that seems to be the culprit: it seems as though it is indeed impossible for RobotC to properly recognize a servo when used in a daisy chain run through the 4th port, wherein it is not first in the chain. I found this out through simple trial and error, changing nothing but the ports and position of the servo and its controller. My team and I just switched a sensor multiplexer to port four and then put the controller chain in port 3, and voila! Problem solved. Feel free to verify, but at least in my version of robotc (3.62), which should be the latest, this seems to be the only way around the oddly-specific issue.
Reply With Quote
Reply


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 12:42.

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