I did something similar two years ago. 32 bit value with 16 bits for encoder style pulse counter and 16 bits for decimal is what I should chose. Position values.
With encoder style I think of an encoder timer which usually overflow and then number of overflows is counted for longer motion. This will allow for an arbitrary long motion but put a limit on how often value is checked. Decimal point is needed to avoid jitter which will happen even at constant speed then number of pulses per second is close to update frequency. For example will an update frequency of 1kHz and a pulse frequency around 1.5kHz produce a lot of jitter but decimal point to place signal within period will remove this. I should have the formula to remove this jitter if you want it? I also implemented averaging of receive time which will allow high jitter on received times with low jitter on pulses if number of receive times i high for the average. It would be possible to use receive FIFO to allow more than one period jitter or sending several positions each time provided positions is known before hand so any feedback would be delayed in this case. I used Micro controller with DMA feeding comparator register. More than one timer period between each pulse require some special handling. By this method flanks will be placed with micro controller clock so it should be both cheap and good method but might be a little bit tricky to avoid errors, there are "hard" real time demands on some updates but but Micro controller usually have good support for this. Regards Nicklas Karlsson On Fri, 30 Mar 2018 17:34:52 -0700 Chris Albertson <[email protected]> wrote: > I'm making a stepper motor pulse generator for my own use but others > might find it useful. To help make sure it is useful to others I'm > asking what specs it would need to have to make in "interesting" to > you. > > Here is what it does... You send it via a serial link a point in 6 > or 7 axis (x,y,z,a,b,c) and a time. The pulse generator will step all > the motors such that they all get to the given point at the specified > time and the movement is along a straight line (in joint space). The > units are "steps". Also you can send it one point and then while the > motors are moving you send it the next point and it will go from one > to the next without stopping. This way the serial link timing need > not be perfect. As long as the next point is sent in time, the timing > is near perfect. > > In my use case all of the move commands are sent at a given rate. say > maybe 50 points per second. The output pulses are "standard TTL" > five volts and maybe about 20 ma source/sink > > Whatever sends the commands does all the inverse kinematics, real > world to joint space transform, acceleration control and so on. All > this thing does is handle the real-time pulse generation so no hard > real time work must be done by the sender. my target cost is "dirt > cheap". > > Now for the survey questions: > > 1) what is the fastest pulse rate you would reasonably use. The > DM542T driver I'm using for testing is spec'd to 200KHz but I can't > imagine anyone actually getting close to that. What's a real number? > > 2) How much jitter in the pulse timing is acceptable? Yes i know it > depends on the speed. > > 3) Are people using balanced signals on the step and direction pins. > I kind of doubt it but want to be sure. > > > I don't know if something like this could be used with MK, if so t > could offload all of the hard real-time requirements. I need this > for a robot arm > > -- > > Chris Albertson > Redondo Beach, California > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Emc-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/emc-users ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Emc-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/emc-users
