loadrt stepgen step_type

More
17 Jul 2014 02:55 #48850 by isladelobos
Hi.

I'm testing one W axis Hal file with steppers but in

loadrt stepgen step_type=0,0,0,0,0,0,0,0,0

can't add more than eight.

In this case i'm configuring the W joint but can't add:

net cdir => parport.1.pin-05-out
net cstep => parport.1.pin-04-out
setp parport.1.pin-04-out-reset 1

setp stepgen.8.position-scale [AXIS_8]SCALE
setp stepgen.8.steplen 1
setp stepgen.8.stepspace 0
setp stepgen.8.dirhold 18200
setp stepgen.8.dirsetup 18200
setp stepgen.8.maxaccel [AXIS_8]STEPGEN_MAXACCEL
net wpos-cmd axis.8.motor-pos-cmd => stepgen.5.position-cmd
net wpos-fb stepgen.8.position-fb => axis.8.motor-pos-fb
net wstep <= stepgen.8.step
net wdir <= stepgen.8.dir


Any suggestions?
Regards.

Please Log in or Create an account to join the conversation.

More
17 Jul 2014 07:18 #48854 by PCW
Replied by PCW on topic loadrt stepgen step_type
The stepgen component only supports creating 8 stepgens currently
so if you actually need more than 8 stepgens, you might have to modify
the stepgen component.

Please Log in or Create an account to join the conversation.

More
17 Jul 2014 12:35 - 17 Jul 2014 13:39 #48863 by isladelobos
Ok.

I'm reading the new HAL manual, but modify this component is a bit difficult for me.

Only change the Max_chan and recompile?

I'm have the 2.4.3 release.
Last edit: 17 Jul 2014 13:39 by isladelobos.

Please Log in or Create an account to join the conversation.

More
17 Jul 2014 15:59 #48866 by ArcEye
Replied by ArcEye on topic loadrt stepgen step_type
This has come up before and stepgen.c was altered to suit
If you use 2.6, it is already in it.

Only change the Max_chan and recompile?

I'm have the 2.4.3 release.


If you want to do it manually, this is a diff between the old and the new code
19c19
<     It supports up to 8 pulse generators.  Each generator can produce
---
>     It supports up to 16 pulse generators.  Each generator can produce
29,30c29,30
<     a comma separated (no spaces) list of up to 8 stepping types
<     to configure up to 8 channels.  A second command line parameter
---
>     a comma separated (no spaces) list of up to 16 stepping types
>     to configure up to 16 channels.  A second command line parameter
307,308c307,308
< #define MAX_CHAN 8
< #define MAX_CYCLE 10
---
> #define MAX_CHAN 16
> #define MAX_CYCLE 18
315,319c315,319
< int step_type[MAX_CHAN] = { -1, -1, -1, -1, -1, -1, -1, -1 };
< RTAPI_MP_ARRAY_INT(step_type,MAX_CHAN,"stepping types for up to 8 channels");
< const char *ctrl_type[MAX_CHAN];
< RTAPI_MP_ARRAY_STRING(ctrl_type,MAX_CHAN,"control type (pos or vel) for up to 8 channels");
< int user_step_type[MAX_CYCLE] = {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1};
---
> int step_type[] = { [0 ... MAX_CHAN-1] = -1 } ;
> RTAPI_MP_ARRAY_INT(step_type,MAX_CHAN,"stepping types for up to 16 channels");
> char *ctrl_type[MAX_CHAN];
> RTAPI_MP_ARRAY_STRING(ctrl_type,MAX_CHAN,"control type (pos or vel) for up to 16 channels");
> int user_step_type[] = { [0 ... MAX_CYCLE-1] = -1 };

So you see you will have to alter a few other things too, but not much

regards

Please Log in or Create an account to join the conversation.

More
17 Jul 2014 19:08 #48882 by PCW
Replied by PCW on topic loadrt stepgen step_type
Looks like the change to 16 channels was done at 2.5

Please Log in or Create an account to join the conversation.

More
17 Jul 2014 19:20 #48885 by ArcEye
Replied by ArcEye on topic loadrt stepgen step_type

Looks like the change to 16 channels was done at 2.5


I thought it should have been, I remember JT patching it a while back after a similar request, but the copy of the 2.5.4 sources I have archived, still had the 8 channels, so I was going by that.
The following user(s) said Thank You: isladelobos

Please Log in or Create an account to join the conversation.

More
18 Jul 2014 15:21 #48915 by isladelobos
Thanks masters.

That was very clarifier for my.
In the next couple of days go recompile or actualize to 2.6.

Please Log in or Create an account to join the conversation.

Time to create page: 0.089 seconds
Powered by Kunena Forum