HURCO KMB-1 Control Update
- NT4Boy
- Offline
- Senior Member
-
Less
More
- Posts: 72
- Thank you received: 6
07 Feb 2025 17:48 #320929
by NT4Boy
Replied by NT4Boy on topic HURCO KMB-1 Control Update
The 5v limits switches, (connected to the 7i77 spare encoder terminals QA3,QB3,IDX3 etc), are registering in linuxcnc randomly. Even though the machine is parked mid stroke, the Y axis min is always true, and I can trigger the X max with a wrench from false to true, but it stays that way with the wrench removed.
Looking at the original control there is a 470ohm resistor to 5v holding the signal to the MUX chip high, and when the limit is triggered, this gets grounded.
Do I need to do something else electrically to gets this working?
Thanks
Looking at the original control there is a 470ohm resistor to 5v holding the signal to the MUX chip high, and when the limit is triggered, this gets grounded.
Do I need to do something else electrically to gets this working?
Thanks
Please Log in or Create an account to join the conversation.
- PCW
-
- Away
- Moderator
-
Less
More
- Posts: 18165
- Thank you received: 4915
07 Feb 2025 18:26 #320932
by PCW
Replied by PCW on topic HURCO KMB-1 Control Update
Are the encoder inputs for the limit switches jumpered for single ended use?
Please Log in or Create an account to join the conversation.
- NT4Boy
- Offline
- Senior Member
-
Less
More
- Posts: 72
- Thank you received: 6
07 Feb 2025 19:22 #320935
by NT4Boy
Replied by NT4Boy on topic HURCO KMB-1 Control Update
Aha, no they weren't.
But they are now.
Can now toggle them all to change state, but oddly y-min is inverted, and cannot quite see what I have done wrong there.
Thanks again.
But they are now.
Can now toggle them all to change state, but oddly y-min is inverted, and cannot quite see what I have done wrong there.
Thanks again.
Please Log in or Create an account to join the conversation.
- PCW
-
- Away
- Moderator
-
Less
More
- Posts: 18165
- Thank you received: 4915
07 Feb 2025 21:17 #320938
by PCW
Replied by PCW on topic HURCO KMB-1 Control Update
Actually the A/B inputs are inverted (which is what you want for an active low home switch input)
But the index input is not inverted.
options:
1. If you have more spare encoder inputs, just use A,B
2. Add 1 or more "not" components to invert the polarity of the input-index pin
But the index input is not inverted.
options:
1. If you have more spare encoder inputs, just use A,B
2. Add 1 or more "not" components to invert the polarity of the input-index pin
Please Log in or Create an account to join the conversation.
- NT4Boy
- Offline
- Senior Member
-
Less
More
- Posts: 72
- Thank you received: 6
08 Feb 2025 12:31 #320990
by NT4Boy
Replied by NT4Boy on topic HURCO KMB-1 Control Update
Yes, it is the index pins that are inverted. Thanks.
net min-y <= hm2_7i92.0.encoder.03.input-index is a pin that needs inverting.
i tried with
net min-y <= hm2_7i92.0.encoder.03.input-index-not , but it errors
the other syntax my friendly AI chatbot suggests for this is:-
loadrt not count =2 (I'll just show one here)
add not.0 servo-thread
net my-input-signal-1 <= hm2_7i92.0.encoder.03.input-index
net inverted-signal-1 = not.0.in
net inverted-signal-1 => your-desired-component (which I guess is min-y)
I don't get what the connection is between inverted-signal-1 and my-input-signal-1
Or should all three lines read inverted-signal-1
Still trying to learn.
net min-y <= hm2_7i92.0.encoder.03.input-index is a pin that needs inverting.
i tried with
net min-y <= hm2_7i92.0.encoder.03.input-index-not , but it errors
the other syntax my friendly AI chatbot suggests for this is:-
loadrt not count =2 (I'll just show one here)
add not.0 servo-thread
net my-input-signal-1 <= hm2_7i92.0.encoder.03.input-index
net inverted-signal-1 = not.0.in
net inverted-signal-1 => your-desired-component (which I guess is min-y)
I don't get what the connection is between inverted-signal-1 and my-input-signal-1
Or should all three lines read inverted-signal-1
Still trying to learn.
Please Log in or Create an account to join the conversation.
- tommylight
-
- Away
- Moderator
-
Less
More
- Posts: 19695
- Thank you received: 6651
08 Feb 2025 12:39 #320991
by tommylight
loadrt not count =2 <<<<< if you need two inverted pins, needs also another addf
addf not.0 servo-thread
addf not.1 servo-thread
net my-input-signal-1 <= hm2_7i92.0.encoder.03.input-index
net non-inverted-signal-1 = not.0.in
net inverted-signal-1 => not.0.out
net inverted-signal-1 => to whatever signal it needs to go
net my-input-signal-2 <= source of the input for inverting
net non-inverted-signal-2 = not.1.in
net inverted-signal-2 => not.1.out
net inverted-signal-2 => to whatever signal it needs to go
Replied by tommylight on topic HURCO KMB-1 Control Update
Yeah, that is not OK, should be something like
loadrt not count =2 (I'll just show one here)
add not.0 servo-thread
net my-input-signal-1 <= hm2_7i92.0.encoder.03.input-index
net inverted-signal-1 = not.0.in
net inverted-signal-1 => your-desired-component (which I guess is min-y)
loadrt not count =2 <<<<< if you need two inverted pins, needs also another addf
addf not.0 servo-thread
addf not.1 servo-thread
net my-input-signal-1 <= hm2_7i92.0.encoder.03.input-index
net non-inverted-signal-1 = not.0.in
net inverted-signal-1 => not.0.out
net inverted-signal-1 => to whatever signal it needs to go
net my-input-signal-2 <= source of the input for inverting
net non-inverted-signal-2 = not.1.in
net inverted-signal-2 => not.1.out
net inverted-signal-2 => to whatever signal it needs to go
Please Log in or Create an account to join the conversation.
- NT4Boy
- Offline
- Senior Member
-
Less
More
- Posts: 72
- Thank you received: 6
08 Feb 2025 14:16 #320994
by NT4Boy
Replied by NT4Boy on topic HURCO KMB-1 Control Update
I still don't follow it I am disappointed in my self to say.
But, have blindly entered:- (Pasted out of the hal file)
loadrt not count=2
addf not.0 servo-thread
addf not.1 servo-thread
net my-input-signal-1 <= hm2_7i92.0.encoder.03.input-index
net non-inverted-signal-1=not.0.in XXXXX
net inverted-signal-1 => not.0.out
net inverted-signal-1 => min-y
net my-input-signal-2 <= hm2_7i92.0.encoder.04.input-index
net non-inverted-signal-2=not.1.in
net inverted-signal-2 => not.1.out
net inverted-signal-2 => max-z
This errors at the line XXXXX with net command needs a pin
But, have blindly entered:- (Pasted out of the hal file)
loadrt not count=2
addf not.0 servo-thread
addf not.1 servo-thread
net my-input-signal-1 <= hm2_7i92.0.encoder.03.input-index
net non-inverted-signal-1=not.0.in XXXXX
net inverted-signal-1 => not.0.out
net inverted-signal-1 => min-y
net my-input-signal-2 <= hm2_7i92.0.encoder.04.input-index
net non-inverted-signal-2=not.1.in
net inverted-signal-2 => not.1.out
net inverted-signal-2 => max-z
This errors at the line XXXXX with net command needs a pin
Please Log in or Create an account to join the conversation.
- tommylight
-
- Away
- Moderator
-
Less
More
- Posts: 19695
- Thank you received: 6651
08 Feb 2025 15:09 - 08 Feb 2025 15:10 #320997
by tommylight
Replied by tommylight on topic HURCO KMB-1 Control Update
loadrt not count=2
addf not.0 servo-thread
addf not.1 servo-thread
net my-input-signal-1 <= not.0.in hm2_7i92.0.encoder.03.input-index
net inverted-signal-1 => not.0.out min-y
net my-input-signal-2 <= not.1.in hm2_7i92.0.encoder.04.input-index
net inverted-signal-2 => not.1.out max-z
Two mistakes there, one mine as i forgot to tie the signals together and yours = do not add or remove stuff randomly, xxxxx does not exist as a pin or function or parameter or anything.
Is the above easier to follow?
addf not.0 servo-thread
addf not.1 servo-thread
net my-input-signal-1 <= not.0.in hm2_7i92.0.encoder.03.input-index
net inverted-signal-1 => not.0.out min-y
net my-input-signal-2 <= not.1.in hm2_7i92.0.encoder.04.input-index
net inverted-signal-2 => not.1.out max-z
Two mistakes there, one mine as i forgot to tie the signals together and yours = do not add or remove stuff randomly, xxxxx does not exist as a pin or function or parameter or anything.
Is the above easier to follow?
Last edit: 08 Feb 2025 15:10 by tommylight.
Please Log in or Create an account to join the conversation.
- NT4Boy
- Offline
- Senior Member
-
Less
More
- Posts: 72
- Thank you received: 6
08 Feb 2025 15:58 #321000
by NT4Boy
Replied by NT4Boy on topic HURCO KMB-1 Control Update
Oh dear, I am for sure making heavy weather of this.
The revised code makes more sense in that I can kind of see the linkage now, but linuxcnc is unhappy with the net inverted-signal statement.
Pin 'min-y' does not exist
I was thinking that the point of that line was to create pin min-y
The revised code makes more sense in that I can kind of see the linkage now, but linuxcnc is unhappy with the net inverted-signal statement.
Pin 'min-y' does not exist
I was thinking that the point of that line was to create pin min-y
Please Log in or Create an account to join the conversation.
- PCW
-
- Away
- Moderator
-
Less
More
- Posts: 18165
- Thank you received: 4915
08 Feb 2025 16:34 - 08 Feb 2025 16:57 #321002
by PCW
Replied by PCW on topic HURCO KMB-1 Control Update
loadrt not count=2
addf not.0 servo-thread
addf not.1 servo-thread
net inverted-min-y <= not.0.in hm2_7i92.0.encoder.03.input-index
net min-y => not.0.out
net inverted-max-z <= not.1.in hm2_7i92.0.encoder.04.input-index
net max-z => not.1.out
"net" syntax is
net signal pin [pin] [pin]
if "signal" does not exist, it will be created
if "signal" does exist, the pins in the net statement will be added
to the existing pins already connected to the signal.
In this case its assumed that the signals min-y and max-z already exist and
connect to linuxcnc's joint limit and possibly home pins.
addf not.0 servo-thread
addf not.1 servo-thread
net inverted-min-y <= not.0.in hm2_7i92.0.encoder.03.input-index
net min-y => not.0.out
net inverted-max-z <= not.1.in hm2_7i92.0.encoder.04.input-index
net max-z => not.1.out
"net" syntax is
net signal pin [pin] [pin]
if "signal" does not exist, it will be created
if "signal" does exist, the pins in the net statement will be added
to the existing pins already connected to the signal.
In this case its assumed that the signals min-y and max-z already exist and
connect to linuxcnc's joint limit and possibly home pins.
Last edit: 08 Feb 2025 16:57 by PCW. Reason: less generic signal names
The following user(s) said Thank You: NT4Boy
Please Log in or Create an account to join the conversation.
Moderators: piasdom
Time to create page: 0.078 seconds