On 04/12/2010 06:19 AM, SourceForge.net wrote:
> Initial Comment:
> Issue:
> with the stepgen going at high vel, push estop.
> Problem:
> after enabling, the stepgen tries to go on with the previous velocity
> prescription, tripping an emc2 ferror
>
> tech. issue:
> while the HM2 stepgen is disabled, it doesn't track the current pos cmd.
> velocity doesn't get reset to 0 during disable
>
> fix:
> void hm2_stepgen_prepare_tram_write(hostmot2_t *hm2, long l_period_ns) {
> int i;
> for (i = 0; i< hm2->stepgen.num_instances; i ++) {
> if (*(hm2->stepgen.instance[i].hal.pin.enable) == 0) {
> hm2->stepgen.step_rate_reg[i] = 0;
> -> hm2->stepgen.instance[i].old_position_cmd =
> *(hm2->stepgen.instance[i].hal.pin.position_cmd);
> -> *(hm2->stepgen.instance[i].hal.pin.velocity_fb) = 0;
> } else {
> hm2_stepgen_instance_prepare_tram_write(hm2, l_period_ns, i);
> }
> }
> }
>
I think I just fixed this in master, in commit
1f75173a3820aae212558d30864265fbcccba14d. Let me know if that commit
fixes the problem for you and i'll merge it into 2.4.
--
Sebastian Kuzminsky
------------------------------------------------------------------------------
_______________________________________________
Emc-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-developers