Hello...
I'm already post that question/wish on the linuxcnc forum and I got
response that here is the right place to ask that. Se here is copy.
;--------------------------------------------------------------------------
Hello...
I'm have homemade stepper driver and have phase inputs. The input to
driver is 3 bit wide and is simply binary count from 0 to 7. After
thinkering I modified stepgen.c and append my sequence to lokup table so
modified part of stepgen.c is now like
[code]
/* lookup tables for stepping types 2 and higher - phase A is the LSB */
static const unsigned char master_lut[][10] = {
{1, 3, 2, 0, 0, 0, 0, 0, 0, 0}, /* type 2: Quadrature */
{1, 2, 4, 0, 0, 0, 0, 0, 0, 0}, /* type 3: Three Wire */
{1, 3, 2, 6, 4, 5, 0, 0, 0, 0}, /* type 4: Three Wire Half Step */
{1, 2, 4, 8, 0, 0, 0, 0, 0, 0}, /* 5: Unipolar Full Step 1 */
{3, 6, 12, 9, 0, 0, 0, 0, 0, 0}, /* 6: Unipoler Full Step 2 */
{1, 7, 14, 8, 0, 0, 0, 0, 0, 0}, /* 7: Bipolar Full Step 1 */
{5, 6, 10, 9, 0, 0, 0, 0, 0, 0}, /* 8: Bipoler Full Step 2 */
{1, 3, 2, 6, 4, 12, 8, 9, 0, 0}, /* 9: Unipolar Half Step */
{1, 5, 7, 6, 14, 10, 8, 9, 0, 0}, /* 10: Bipolar Half Step */
{1, 2, 4, 8, 16, 0, 0, 0, 0, 0}, /* 11: Five Wire Unipolar */
{3, 6, 12, 24, 17, 0, 0, 0, 0, 0}, /* 12: Five Wire Wave */
{1, 3, 2, 6, 4, 12, 8, 24, 16, 17}, /* 13: Five Wire Uni Half */
{3, 7, 6, 14, 12, 28, 24, 25, 17, 19}, /* 14: Five Wire Wave Half */
{1, 2, 3, 4, 5, 6, 7, 0, 0, 0} /* 15: CAA MODE */
};
static const unsigned char cycle_len_lut[] =
{ 4, 3, 6, 4, 4, 4, 4, 8, 8, 5, 5, 10, 10, 8 };
static const unsigned char num_phases_lut[] =
{ 2, 3, 3, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 3, };
#define MAX_STEP_TYPE 15
[/code]
Now I have no clue how to update that this to be included in next relase
(I don't want to recompile each relase to work with my driver)
I have better idea for other's too.
Maybe is possible to make step_type 15 custom. So when I startup stepgen
with
[code]
loadrt stepgen step_type=15,15,15
[/code]
to use something like
[code]
loadrt stepgen step_type=15,15,15 step_phases=3 step_cycle_len=8
step_phase_table 1,2,3,4,5,6,7,0
[/code]
In this way all other phase sequences can be supported.
I'm just not a C programmer to do that.
Is there some herro to do that?!?
Thanks
Slavko.
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Emc-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-developers