Quote:
Originally Posted by Tom Bottiglieri
Kevin -
Is 120Hz the actual max update rate on the victors? Is this published info or do you just know off hand.
We desperately need more control on our drive motors this year but the 40Hz loop is wayy wayy wayy too slow. I'm not sure if 120Hz would even help.
|
Tom,
IFI seems a little conflicted about exactly how fast you can update the vics.
This FAQ says the update rate is 120 Hz.
However,
This other FAQ says that the vic requires the signal line to be held low for 8ms between pulses. Which actually works out to 100 Hz, considering the 2 ms high pulse for full forward condition. So I think you'd be safe setting up a timer and updating the PWMs at 100 Hz in your x_Spin() function. IFI also says that there maybe be a delay before the change is reflected on the output, so it might behoove you to set up a test rig and monitor the output on a decent digital storage o-scope.
I'll note that 57 had a fast update loop on our shooter wheel a few years back. We ran it at about 75 Hz, if I recall correctly. Our update rate was actually primarily limited by how quickly it was reasonable to sample our encoder. If you're going the standard route of counting encoder ticks per unit of time to get velocity, getting a 100 step resolution at 100 Hz means you're servicing 10000 interrupts per second. We had a fun trick to get around this without any extra hardware, but it's only good for 1 encoder and it's non-directional to boot.