Go to Post I've had parents tell me I'm a great role model for their daughters, because I was a female leader. It's a great feeling to hear something like that. - Liz Smith [more]
Home
Go Back   Chief Delphi > ChiefDelphi.com Website > Extra Discussion
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
  #13   Spotlight this post!  
Unread 10-05-2015, 14:49
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,011
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: pic: Small CIM in wheel swerve

Quote:
Originally Posted by Ether View Post
6) incorrect programming (resetting the counts rather than letting the FPGA accumulator run freely).
Quote:
Originally Posted by Bryce2471 View Post
We used the WPI lib encoder software, so I'll hope it wasn't #6.
Using the WPILib doesn't rule out #6. #6 refers to using the reset() function repeatedly in your software in the roboRIO.

Code:
/**
 * Reset the Encoder distance to zero. Resets the current count to zero on
 * the encoder.
 */
public void reset() {
	if (m_counter != null) {
		m_counter.reset();
	} else {
		ByteBuffer status = ByteBuffer.allocateDirect(4);
		// set the byte order
		status.order(ByteOrder.LITTLE_ENDIAN);
		EncoderJNI.resetEncoder(m_encoder, status.asIntBuffer());
		HALUtil.checkStatus(status.asIntBuffer());
	}
}
I've seen code where the counts are read and then reset() every cycle. You can miss counts that way. I'm not saying that's what your code is doing... but if it is, that might explain your "drift".


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 01:40.

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