PC Utility To Sweep RPM With The MissingTooth Hack BenchTest
Posted: Tue Dec 20, 2011 10:09 pm
Dumped from IRC and rearranged to be more useful and less random:
[21:32] <@FreeAir> still need a PC utility to pump data into it, i want to sweep rpm, triangle style is fine for a start
[21:33] <@FreeAir> send a stop logging packet, hard coded
[21:33] <@FreeAir> send a bench test setup packet, partly hard coded, pull number of base teeth from the command line --BaseTeeth=12/36/24
[21:33] <@FreeAir> send many rpm adjust packets, mostly hard coded, just checksummed and escaped afterward
[21:33] <@FreeAir> you could add an adjustable pause between to optimise it from the command line with --InterPacketPause=3ms
[21:33] <@FreeAir> have a function RPM vs time
[21:33] <@FreeAir> pull the rpm out of the function for each packet
[21:33] <@FreeAir> based on time
[21:34] <@FreeAir> bonus points for displaying current RPM in a UI of some sort, even if it's a console line
[21:36] <@FreeAir> so you could A stop logging, B start the test C display RPM and pump out RPM
[21:38] <@FreeAir> cycleFreeEMSBenchTestRPMHack --Pattern=triangle --StartRPM=50 --MinRPM=50 --MaxRPM=7000 --SweepPeriod=10s
[21:38] <@FreeAir> something like that, only triangle for now, hard code that if you like, or error on other stuff
[21:43] <@FreeAir> max out the iterations
[21:38] <@FreeAir> you can write to the read only structs when you have bench test firmware loaded, and at no other time.
[21:38] <@FreeAir> so the new hack just reads from that and uses it for the slice period
[21:39] <@FreeAir> sample RPM set packets are in the lib dir
[21:39] <@FreeAir> same for stop logging and bench test packets
https://github.com/fredcooke/freeems-va ... 0x0200.bin
https://github.com/fredcooke/freeems-va ... 0x0400.bin
https://github.com/fredcooke/freeems-va ... 00-OFF.bin
https://github.com/fredcooke/freeems-va ... rallel.bin
Packet structure: https://github.com/fredcooke/freeems-va ... cation.tex
[21:45] <@FreeAir> you can ignore all the return packets and just flood the line with a continuous stream
[21:39] <@johntramp> ok, i should read up on the bench test firmware
[21:39] <@johntramp> there must be a thread somewhere, right?
viewtopic.php?f=56&t=1180
[21:40] <@FreeAir> in fact, i think it's in the latex now
https://github.com/fredcooke/freeems-va ... erface.tex
You need to calculate the RPM from number of ticks per event, number of events per cycle, or vice versa, a cycle is a revolution in this mode.
To trigger the mode, set one of the PWs to 3, and the rest to not-3, then all that matters are the first three values. The "which event" values don't matter. The "how many cycles" should be maxed. 5 of the PWs don't matter. Events per cycle = base teeth. Ticks per event = related to RPM via this formula:
60000000 / (baseteeth * toothperiod * 0.8)
from this post: viewtopic.php?p=20967#p20967
[21:45] <@FreeAir> just a little single C file would be OK
[21:46] <@FreeAir> let me do a thread from the above conversation to clean it up for you
Done! :-)
Fred.
[21:32] <@FreeAir> still need a PC utility to pump data into it, i want to sweep rpm, triangle style is fine for a start
[21:33] <@FreeAir> send a stop logging packet, hard coded
[21:33] <@FreeAir> send a bench test setup packet, partly hard coded, pull number of base teeth from the command line --BaseTeeth=12/36/24
[21:33] <@FreeAir> send many rpm adjust packets, mostly hard coded, just checksummed and escaped afterward
[21:33] <@FreeAir> you could add an adjustable pause between to optimise it from the command line with --InterPacketPause=3ms
[21:33] <@FreeAir> have a function RPM vs time
[21:33] <@FreeAir> pull the rpm out of the function for each packet
[21:33] <@FreeAir> based on time
[21:34] <@FreeAir> bonus points for displaying current RPM in a UI of some sort, even if it's a console line
[21:36] <@FreeAir> so you could A stop logging, B start the test C display RPM and pump out RPM
[21:38] <@FreeAir> cycleFreeEMSBenchTestRPMHack --Pattern=triangle --StartRPM=50 --MinRPM=50 --MaxRPM=7000 --SweepPeriod=10s
[21:38] <@FreeAir> something like that, only triangle for now, hard code that if you like, or error on other stuff
[21:43] <@FreeAir> max out the iterations
[21:38] <@FreeAir> you can write to the read only structs when you have bench test firmware loaded, and at no other time.
[21:38] <@FreeAir> so the new hack just reads from that and uses it for the slice period
[21:39] <@FreeAir> sample RPM set packets are in the lib dir
[21:39] <@FreeAir> same for stop logging and bench test packets
https://github.com/fredcooke/freeems-va ... 0x0200.bin
https://github.com/fredcooke/freeems-va ... 0x0400.bin
https://github.com/fredcooke/freeems-va ... 00-OFF.bin
https://github.com/fredcooke/freeems-va ... rallel.bin
Packet structure: https://github.com/fredcooke/freeems-va ... cation.tex
[21:45] <@FreeAir> you can ignore all the return packets and just flood the line with a continuous stream
[21:39] <@johntramp> ok, i should read up on the bench test firmware
[21:39] <@johntramp> there must be a thread somewhere, right?
viewtopic.php?f=56&t=1180
[21:40] <@FreeAir> in fact, i think it's in the latex now
https://github.com/fredcooke/freeems-va ... erface.tex
You need to calculate the RPM from number of ticks per event, number of events per cycle, or vice versa, a cycle is a revolution in this mode.
To trigger the mode, set one of the PWs to 3, and the rest to not-3, then all that matters are the first three values. The "which event" values don't matter. The "how many cycles" should be maxed. 5 of the PWs don't matter. Events per cycle = base teeth. Ticks per event = related to RPM via this formula:
60000000 / (baseteeth * toothperiod * 0.8)
from this post: viewtopic.php?p=20967#p20967
[21:45] <@FreeAir> just a little single C file would be OK
[21:46] <@FreeAir> let me do a thread from the above conversation to clean it up for you
Done! :-)
Fred.