loadrt stepgen step_type
- isladelobos
- Offline
- New Member
- Posts: 18
- Thank you received: 0
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.
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.
- isladelobos
- Offline
- New Member
- Posts: 18
- Thank you received: 0
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.
Please Log in or Create an account to join the conversation.
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.
Please Log in or Create an account to join the conversation.
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.
Please Log in or Create an account to join the conversation.
- isladelobos
- Offline
- New Member
- Posts: 18
- Thank you received: 0
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.