Go to Post We also have a " big daddy" hand riveter. In my estimation one could have assembled the George Washington bridge with it. - DonRotolo [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 02-13-2016, 12:07 PM
rcdturtle rcdturtle is offline
rcdturtle
AKA: Dick DuCharme
FRC #3534 (House of Cards)
Team Role: Mentor
 
Join Date: Jan 2014
Rookie Year: 2011
Location: Davison,MI
Posts: 10
rcdturtle is an unknown quantity at this point
SRX Position Control Confusion

We are attempting to control a gear with a rotation range of about 180 degrees in a subsystem called Pivot. We are using joystick input to manually move the gear by bumping the position each cycle the joystick method is called. This allows the pivot to remain at the last joystick commanded position as barriers are crossed. That code is at the bottom of the attachment. It works just as intended.
Our problem occurs when we attempt to progmatically send the pivot to a particular position. We are attempting to read the current position of the gear, determine the difference between the current and commanded positions and use the difference with a SET() command to move to the desired position.
Apparently we don't understand something because every time we execute the SetPivotAngle command the gear rotates constantly. This is true even though the IsFinished requirements are met in the command.
The code is below as you can see we have made several stabs at it.
Thanks in advance for your help.
Attached Files
File Type: txt 3534 SRX Position Control Atempts.txt (3.5 KB, 11 views)
  #2   Spotlight this post!  
Unread 02-13-2016, 01:22 PM
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,112
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: SRX Position Control Confusion

Where is angle defined, and where is it set?
  #3   Spotlight this post!  
Unread 02-13-2016, 02:55 PM
rcdturtle rcdturtle is offline
rcdturtle
AKA: Dick DuCharme
FRC #3534 (House of Cards)
Team Role: Mentor
 
Join Date: Jan 2014
Rookie Year: 2011
Location: Davison,MI
Posts: 10
rcdturtle is an unknown quantity at this point
Re: SRX Position Control Confusion

Sorry we didn't send all of the SetPivotAngle code. The variable angle comes as a parameter when the command SetPivotAngle is instantiated in OI or as part of a group command; it is in degrees of gear position.
Attached Files
File Type: docx All of SetPivotAngle.docx (4.9 KB, 3 views)
Closed Thread


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:38 PM.

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