HURCO KMB-1 Control Update
- NT4Boy
- Offline
- Premium Member
-
Less
More
- Posts: 146
- Thank you received: 13
08 Feb 2026 00:23 #342621
by NT4Boy
Replied by NT4Boy on topic HURCO KMB-1 Control Update
Thanks Andy. In fact I amusing Open Loop control fo this spindle. its a 2hp three phase device and seems pretty stable as is. Tried the improive it with pid tuning but only made things worse.
Still not got the orient to work. Swiching pids ok, but somewhere the orient count, angle and units screwed up and not reseting on the index.
might take a while longer.
Still not got the orient to work. Swiching pids ok, but somewhere the orient count, angle and units screwed up and not reseting on the index.
might take a while longer.
Please Log in or Create an account to join the conversation.
- andypugh
-
- Offline
- Moderator
-
Less
More
- Posts: 19822
- Thank you received: 4616
08 Feb 2026 18:16 - 08 Feb 2026 18:18 #342659
by andypugh
Replied by andypugh on topic HURCO KMB-1 Control Update
I don't think that Orient uses index.
(It probably should, and adding spindles to the homing sequence is something that I meant to do and seem to have forgotten).
If you were to set the spindle-index-enable in the HAL file then the encoder would be aligned to index as soon as it does a revolution in spindle mode.
The "orient" component exists specifically to account for the many thousands of accumulated turns accumulated in the spindle encoder counter.
If you wanted to re-index on every orient then one way would be to create a modified version of "orient" that outputs an index-enable and that also commands an initial position command morfe than one turn from the starting postition until the index reset is detected.
(It probably should, and adding spindles to the homing sequence is something that I meant to do and seem to have forgotten).
If you were to set the spindle-index-enable in the HAL file then the encoder would be aligned to index as soon as it does a revolution in spindle mode.
The "orient" component exists specifically to account for the many thousands of accumulated turns accumulated in the spindle encoder counter.
If you wanted to re-index on every orient then one way would be to create a modified version of "orient" that outputs an index-enable and that also commands an initial position command morfe than one turn from the starting postition until the index reset is detected.
Last edit: 08 Feb 2026 18:18 by andypugh.
Please Log in or Create an account to join the conversation.
- NT4Boy
- Offline
- Premium Member
-
Less
More
- Posts: 146
- Thank you received: 13
08 Feb 2026 18:42 #342663
by NT4Boy
Replied by NT4Boy on topic HURCO KMB-1 Control Update
Crumbs I was sure that the angle used in M19, was the angle after an index pulse, but can see now its after the enable edge. Guess I cannot get the index to trigger the enable. Pulling oneself up by the bootlaces I expect.
I've been wondering whey I never really followed the logic behind how those on the forum have got tool changing to work.
So what is orient intended to do as I cannot picture what it can do if not related to a fixed point on the spindle.
A index relatable orient sounds like what I'd like, but not really got a clue how to start looking at that. Perhaps a bolt on python bit, a language I'm completely unfamiliar with. I'll do some research.
Thanks Andy.
I've been wondering whey I never really followed the logic behind how those on the forum have got tool changing to work.
So what is orient intended to do as I cannot picture what it can do if not related to a fixed point on the spindle.
A index relatable orient sounds like what I'd like, but not really got a clue how to start looking at that. Perhaps a bolt on python bit, a language I'm completely unfamiliar with. I'll do some research.
Thanks Andy.
Please Log in or Create an account to join the conversation.
- NT4Boy
- Offline
- Premium Member
-
Less
More
- Posts: 146
- Thank you received: 13
17 Feb 2026 13:50 #343094
by NT4Boy
Replied by NT4Boy on topic HURCO KMB-1 Control Update
I replaced the spindle motor VFD, three phase outpout and the speed signal is 0-10v.
I notice that the speed varies in a random way and at say 1000 rpm, I get steps of 15 to 30 plus and minus.
The fuzzy line is an oscilloscope trace of the analogout5 pin on the 7i77.
The lower halscope trace is the same pin also nominally at 1000, offset and magnified to show what I can hear.
I have started the spindle using MDI with M3 S1000.
Any ideas what maye be going on?
I notice that the speed varies in a random way and at say 1000 rpm, I get steps of 15 to 30 plus and minus.
The fuzzy line is an oscilloscope trace of the analogout5 pin on the 7i77.
The lower halscope trace is the same pin also nominally at 1000, offset and magnified to show what I can hear.
I have started the spindle using MDI with M3 S1000.
Any ideas what maye be going on?
Attachments:
Please Log in or Create an account to join the conversation.
- PCW
-
- Offline
- Moderator
-
Less
More
- Posts: 17800
- Thank you received: 5206
17 Feb 2026 18:55 #343106
by PCW
Replied by PCW on topic HURCO KMB-1 Control Update
If this is closed loop, I would check for issues with the encoder setup
or PID setup
Is the encoder velocity used for feedback?
or PID setup
Is the encoder velocity used for feedback?
Please Log in or Create an account to join the conversation.
- NT4Boy
- Offline
- Premium Member
-
Less
More
- Posts: 146
- Thank you received: 13
17 Feb 2026 19:22 #343110
by NT4Boy
Replied by NT4Boy on topic HURCO KMB-1 Control Update
Peter,
No its open loop. I've got all the gains at zero bar FF0=1.
I do have an encoder though.
No its open loop. I've got all the gains at zero bar FF0=1.
I do have an encoder though.
Please Log in or Create an account to join the conversation.
- PCW
-
- Offline
- Moderator
-
Less
More
- Posts: 17800
- Thank you received: 5206
17 Feb 2026 20:01 #343112
by PCW
Replied by PCW on topic HURCO KMB-1 Control Update
If it's open loop, the question becomes what is changing the analog out command?
(bottom trace second plot)
(bottom trace second plot)
Please Log in or Create an account to join the conversation.
- PCW
-
- Offline
- Moderator
-
Less
More
- Posts: 17800
- Thank you received: 5206
17 Feb 2026 23:31 - 17 Feb 2026 23:33 #343117
by PCW
Replied by PCW on topic HURCO KMB-1 Control Update
Crumbs I was sure that the angle used in M19, was the angle after an index pulse, but can see now its after the enable edge.
The spindle position after an index pulse is the angle relative to the index pulse, not the enable.
The enable arms the hardware to detect the index and when index has been detected by the
hardware, signal the driver that index has been detected. The counter hardware also either latches
the count at index (Mesa hardware does this) or clears the count at index so that the spindle position
is set to 0 at the index position.
The spindle position after an index pulse is the angle relative to the index pulse, not the enable.
The enable arms the hardware to detect the index and when index has been detected by the
hardware, signal the driver that index has been detected. The counter hardware also either latches
the count at index (Mesa hardware does this) or clears the count at index so that the spindle position
is set to 0 at the index position.
Last edit: 17 Feb 2026 23:33 by PCW.
The following user(s) said Thank You: NT4Boy
Please Log in or Create an account to join the conversation.
- NT4Boy
- Offline
- Premium Member
-
Less
More
- Posts: 146
- Thank you received: 13
18 Feb 2026 08:58 #343138
by NT4Boy
Replied by NT4Boy on topic HURCO KMB-1 Control Update
Ok Peter, so that is resetting my original understanding. But I have been unable to get the index pulse, which is clearly present in halscope to trigger the position reset. The sensors I am using for both the toothed wheel (a pair in quadrature) and a separaste index tooth, is ATS616LSG by Allegro.
Datasheet
Just wondering if there is some magic in the devices that makes them unsuitable here. ( a straw to clutch at).
Re the speed variation, then I don't think there is anything in the config that is altering the analogout.
I have these:- But I think they are only used for the pyvcp speed display bar and at speed led. Can the act of processing them anyway do something? I guess the thing to try is a minimum basic clean build and see what goes from there.
setp lowpass.spindle.gain 1.000000
net spindle-vel-fb-rpm => abs.spindle.in
net spindle-vel-fb-rpm-abs abs.spindle.out => lowpass.spindle.in
net spindle-fb-rpm-abs-filtered lowpass.spindle.out
# ---Setup spindle at speed signals---
#sets spindle-at-speed true
net spindle-vel-cmd-rps => near.0.in1
net spindle-vel-fb-rps => near.0.in2
net spindle-at-speed <= near.0.out
#net spindle-at-speed spindle.0.at-speed <= near.0.out
setp near.0.scale 1.000000
setp near.0.difference 1.666667
Just wondering if there is some magic in the devices that makes them unsuitable here. ( a straw to clutch at).
Re the speed variation, then I don't think there is anything in the config that is altering the analogout.
I have these:- But I think they are only used for the pyvcp speed display bar and at speed led. Can the act of processing them anyway do something? I guess the thing to try is a minimum basic clean build and see what goes from there.
setp lowpass.spindle.gain 1.000000
net spindle-vel-fb-rpm => abs.spindle.in
net spindle-vel-fb-rpm-abs abs.spindle.out => lowpass.spindle.in
net spindle-fb-rpm-abs-filtered lowpass.spindle.out
# ---Setup spindle at speed signals---
#sets spindle-at-speed true
net spindle-vel-cmd-rps => near.0.in1
net spindle-vel-fb-rps => near.0.in2
net spindle-at-speed <= near.0.out
#net spindle-at-speed spindle.0.at-speed <= near.0.out
setp near.0.scale 1.000000
setp near.0.difference 1.666667
Please Log in or Create an account to join the conversation.
- NT4Boy
- Offline
- Premium Member
-
Less
More
- Posts: 146
- Thank you received: 13
18 Feb 2026 17:49 - 18 Feb 2026 17:50 #343156
by NT4Boy
Replied by NT4Boy on topic HURCO KMB-1 Control Update
I'd forgotten what a mission I'd had at the start of my linuxcnc adventure with limit switches, so building a config from scratch was a sufficient challenge. Anyway after copying in just the essential parts from the working hal, was able to home it and run the spindle. Runs, of course, without any hiccups at all. Will start adding in the complications and see which one is the bad guy. Will report back.
Last edit: 18 Feb 2026 17:50 by NT4Boy.
Please Log in or Create an account to join the conversation.
Moderators: piasdom
Time to create page: 0.126 seconds