View Single Post
  #7   Spotlight this post!  
Unread 08-02-2013, 15:04
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,089
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: Configure Timers


Quote:
Any recommendation for a new averaging value?
edited excerpt from one of my earlier posts:
...use only one channel of the encoder, and configure the FPGA to count only the rising edges of that channel and to report the period based on the elapsed time between the 126 most recent counts (i.e. set the FPGA averaging to 125 samples). You would use the GetPeriod() method of the Counter class to get the period. At 2300 rpm you should get single-digit rpm jitter (+/-3rpm) with this setup, and with only 1/4 of a rev lag instead of seven and a half revs. You could ask for speeds at a 10ms rate and get a fresh reading each time.

Quote:
If you want to run your motor faster than 20ms, you must place the drive code in a different loop, thread, etc that does not wait for new DS packets.
I thought that went without saying.


Quote:
You are taking what I said out of context.
Not intentionally. I was responding to what I thought you were saying. My point was: with enough load inertia and a fast enough execution cycle, you won't have the oscillations you seemed to be concerned about with bang-bang. Once you've got something working, you can slow the execution rate down if you like, but bang-bang is so short and simple it shouldn't be a problem to run it fast (unless there's excessive overhead in Java to do so).


Quote:
GetPPCTimestamp(). Not available on Java.
I'm not a Java guru. Can't you write a short assembly routine and ask the Java VM to run it using JNI?


Reply With Quote