- Posts: 78
- Thank you received: 1
HAL M19 Orient dont work
3 years 7 months ago - 3 years 7 months ago #267542
by Stefan321
Replied by Stefan321 on topic HAL M19 Orient dont work
I could fix the turning up of the spindle, but the spindle still does not orient itself. she turns a few times in circles, then gets slower and slower and stops somewherei only have one spindle, but it has to switch between speed and position
Last edit: 3 years 7 months ago by Stefan321.
Please Log in or Create an account to join the conversation.
3 years 7 months ago #267589
by andypugh
Replied by andypugh on topic HAL M19 Orient dont work
This sounds like the command and feedback for the position PID are coming from incompatible sources.
Both command and feedback should be total spindle revolutions.
If you disable the position PID (so that no spindle motion takes place) program an orient move after a few seconds of spindle rotation and look at the orient pid command pin and feedback pin using halmeter or halshow. They should be no more than one turn apart.
Is your spindle position scaling correct? Does it increase by exactly 1.0 for every spindle rotation?
Both command and feedback should be total spindle revolutions.
If you disable the position PID (so that no spindle motion takes place) program an orient move after a few seconds of spindle rotation and look at the orient pid command pin and feedback pin using halmeter or halshow. They should be no more than one turn apart.
Is your spindle position scaling correct? Does it increase by exactly 1.0 for every spindle rotation?
Please Log in or Create an account to join the conversation.
3 years 7 months ago - 3 years 7 months ago #267600
by Stefan321
Replied by Stefan321 on topic HAL M19 Orient dont work
Hello, thanks for the tips, unfortunately I'm not that good at programming. But I have new results.
First, one spindle revolution corresponds to 1.0. Thus, the encoder number is correct.
The next thing I noticed was that the spindle-pos-err always responds in the opposite case. So if rev says 2 then my pos-err says -2.
I also found out today that the pin spindle is orient was true.
What i have noticed in the last few days and again today, especially when i look at the rev, that the spindle continues to run and so emotionally runs past it at the end. If I do G33.1 and the spindle moves out again, the end position is higher than the start position. after completing the g33.1, the machine quickly moves back to the starting position. that looks strange and is irritating. after that back to orient and 1.0 due to the overrun, the spindle then comes to example: 1.375.
I'll attach the current ini and hal in the attachment maybe you'll notice an error, I just don't have an eye for it yet.
First, one spindle revolution corresponds to 1.0. Thus, the encoder number is correct.
The next thing I noticed was that the spindle-pos-err always responds in the opposite case. So if rev says 2 then my pos-err says -2.
I also found out today that the pin spindle is orient was true.
What i have noticed in the last few days and again today, especially when i look at the rev, that the spindle continues to run and so emotionally runs past it at the end. If I do G33.1 and the spindle moves out again, the end position is higher than the start position. after completing the g33.1, the machine quickly moves back to the starting position. that looks strange and is irritating. after that back to orient and 1.0 due to the overrun, the spindle then comes to example: 1.375.
I'll attach the current ini and hal in the attachment maybe you'll notice an error, I just don't have an eye for it yet.
Last edit: 3 years 7 months ago by Stefan321.
Please Log in or Create an account to join the conversation.
3 years 7 months ago #267602
by andypugh
Replied by andypugh on topic HAL M19 Orient dont work
One thing that does puzzle me is the offset component that is between spindle-orient.command and the PID command.
Do you remember why that is there?
Do you remember why that is there?
Please Log in or Create an account to join the conversation.
3 years 7 months ago #267609
by Stefan321
Replied by Stefan321 on topic HAL M19 Orient dont work
can't say. only the positioning is saved between. moreover, it is routed from cmd to cmd1. I might try throwing that out.
I'm not sure if it solves my problem
I'm not sure if it solves my problem
Please Log in or Create an account to join the conversation.
3 years 7 months ago #267617
by andypugh
Replied by andypugh on topic HAL M19 Orient dont work
Yes, but then cmd1 is what is connected as the input to the PID:moreover, it is routed from cmd to cmd1.
Code:
net orient-angle spindle-orient.angle => spindle.0.orient-angle
net spindle-pos => spindle-pid.feedback => spindle-orient.position
net spindle-pos <= spindle.0.revs <= [HMOT](CARD0).encoder.04.position
setp offset.0.offset 1
net spindle.orient-cmd spindle-orient.command => offset.0.in
net spindle-orient-cmd1 offset.0.out => spindle-pid.command
Please Log in or Create an account to join the conversation.
Time to create page: 0.080 seconds