Troubles to get started with SD240 Retrofit
- ziggi
-
Topic Author
- Offline
- Junior Member
-
Less
More
- Posts: 30
- Thank you received: 0
13 Jul 2025 17:09 #331772
by ziggi
Replied by ziggi on topic Troubles to get started with SD240 Retrofit
No unfortunately a new Config with a MPG already included did not do the trick.
Manual jogging the X and Z axes works, continuos and inkremental but not with the encoder I intend to use as MPG.
I once again ran the suggested command "halcmd show pin | grep jog" - report attached.
Did not imagine it would be this challenging to get a MPG connected...
Sigi
Manual jogging the X and Z axes works, continuos and inkremental but not with the encoder I intend to use as MPG.
I once again ran the suggested command "halcmd show pin | grep jog" - report attached.
Did not imagine it would be this challenging to get a MPG connected...
Sigi
Attachments:
Please Log in or Create an account to join the conversation.
- PCW
-
- Away
- Moderator
-
Less
More
- Posts: 19097
- Thank you received: 5270
13 Jul 2025 21:23 #331785
by PCW
Replied by PCW on topic Troubles to get started with SD240 Retrofit
Again, the jog enables are false so the jog counts are ignored.
The jog enables are false because they are not connected to any
source (no hal "out" pin)
note that halui.axis.x.select and halui.axis.z.select pins are hal "in"
pins so can not enable anything.
What do you do to select an axis for jogging?
This part seems to be missing
That is, these need an additional connection
from whatever selects an axis for jogging:
net axis-select-x halui.axis.x.select
net axis-select-z halui.axis.z.select
The jog enables are false because they are not connected to any
source (no hal "out" pin)
note that halui.axis.x.select and halui.axis.z.select pins are hal "in"
pins so can not enable anything.
What do you do to select an axis for jogging?
This part seems to be missing
That is, these need an additional connection
from whatever selects an axis for jogging:
net axis-select-x halui.axis.x.select
net axis-select-z halui.axis.z.select
The following user(s) said Thank You: ziggi
Please Log in or Create an account to join the conversation.
- Benb
-
- Offline
- Elite Member
-
Less
More
- Posts: 180
- Thank you received: 58
13 Jul 2025 23:53 #331797
by Benb
Replied by Benb on topic Troubles to get started with SD240 Retrofit
Following is a hal netlisting for the MPG part of your question:
# Set jog-vel-mode to false (joint will move exactly jog-scale units for each count)
setp joint.0.jog-vel-mode 0
setp joint.2.jog-vel-mode 0
setp axis.x.jog-vel-mode 0
setp axis.z.jog-vel-mode 0
# Set jog scale
setp mpg-scale 1.0
net mpg-scale joint.0.jog-scale axis.x.jog-scale
net mpg-scale joint.2.jog-scale axis.z.jog-scale
# Joint selection (enable only one at a time)
net mpg-select-x joint.0.jog-enable axis.x.jog-enable <= hm2_7ixx.your selector switch input
net mpg-select-z joint.2.jog-enable axis.z.jog-enable <= hm2_7ixx.your selector switch input
# Connect encoder counts to all joints (only enabled one will move)
net mpg-counts hm2_7ixx.your mpg encoder address
net mpg=counts joint.0.jog-counts axis.x.jog-counts
net mpg-counts joint.2.jog-counts axis.z.jog-counts
# Set jog-vel-mode to false (joint will move exactly jog-scale units for each count)
setp joint.0.jog-vel-mode 0
setp joint.2.jog-vel-mode 0
setp axis.x.jog-vel-mode 0
setp axis.z.jog-vel-mode 0
# Set jog scale
setp mpg-scale 1.0
net mpg-scale joint.0.jog-scale axis.x.jog-scale
net mpg-scale joint.2.jog-scale axis.z.jog-scale
# Joint selection (enable only one at a time)
net mpg-select-x joint.0.jog-enable axis.x.jog-enable <= hm2_7ixx.your selector switch input
net mpg-select-z joint.2.jog-enable axis.z.jog-enable <= hm2_7ixx.your selector switch input
# Connect encoder counts to all joints (only enabled one will move)
net mpg-counts hm2_7ixx.your mpg encoder address
net mpg=counts joint.0.jog-counts axis.x.jog-counts
net mpg-counts joint.2.jog-counts axis.z.jog-counts
The following user(s) said Thank You: ziggi
Please Log in or Create an account to join the conversation.
- ziggi
-
Topic Author
- Offline
- Junior Member
-
Less
More
- Posts: 30
- Thank you received: 0
14 Jul 2025 05:32 - 14 Jul 2025 07:27 #331805
by ziggi
Replied by ziggi on topic Troubles to get started with SD240 Retrofit
Oh, damned... Thank you for the brief explanation.
The root of all the trouble seems I understood this totally wrong.
I thought "selected axis" and also the "increment" was taken from the AXIS screen- both can be chosen there
Sorry for my sillyness. Now I understood that I need to connect the MPG in the HAL via in/outputs.
Thank you both of you
Sigi
The root of all the trouble seems I understood this totally wrong.
I thought "selected axis" and also the "increment" was taken from the AXIS screen- both can be chosen there
Sorry for my sillyness. Now I understood that I need to connect the MPG in the HAL via in/outputs.
Thank you both of you
Sigi
Last edit: 14 Jul 2025 07:27 by ziggi.
Please Log in or Create an account to join the conversation.
- ziggi
-
Topic Author
- Offline
- Junior Member
-
Less
More
- Posts: 30
- Thank you received: 0
16 Jul 2025 10:41 - 16 Jul 2025 10:42 #331891
by ziggi
Replied by ziggi on topic Troubles to get started with SD240 Retrofit
In this thread it was asked how to link parport signals to axis: forum.linuxcnc.org/21-axis/31791-how-to-...l-signal-to-axis-jog
and an example was given.
Wouldn´t it be possible to link the AXIS screen status to the MPG signal too? - so the other way round..
In other words use the selection chosen in AXIS of the axis and increment and link them to the jog mode, so that except the encoder no external elements for the axes and increment selection are necessary?
Might not make sense for a mill where you want a kind of remote control, but for a small lathe it would be convinient...
and an example was given.
Wouldn´t it be possible to link the AXIS screen status to the MPG signal too? - so the other way round..
In other words use the selection chosen in AXIS of the axis and increment and link them to the jog mode, so that except the encoder no external elements for the axes and increment selection are necessary?
Might not make sense for a mill where you want a kind of remote control, but for a small lathe it would be convinient...
Last edit: 16 Jul 2025 10:42 by ziggi.
Please Log in or Create an account to join the conversation.
- ziggi
-
Topic Author
- Offline
- Junior Member
-
Less
More
- Posts: 30
- Thank you received: 0
25 Jul 2025 05:30 #332294
by ziggi
Replied by ziggi on topic Troubles to get started with SD240 Retrofit
So I found the AXIS Gui document and if I apply the pins described there to your MPG code, it should be about this
# Set jog-vel-mode to false (joint will move exactly jog-scale units for each count)
setp joint.0.jog-vel-mode 0
setp joint.1.jog-vel-mode 0
setp axis.x.jog-vel-mode 0
setp axis.z.jog-vel-mode 0
# Set jog scale
setp mpg-scale 1.0
net mpg-scale joint.0.jog-scale axis.x.jog-scale <= halui.axis.selected.increment
net mpg-scale joint.1.jog-scale axis.z.jog-scale <= halui.axis.selected.increment
# Joint selection (enable only one at a time)
net mpg-select-x joint.0.jog-enable axis.x.jog-enable <= halui.axis.selected.0
net mpg-select-z joint.1.jog-enable axis.z.jog-enable <= halui.axis.selected.1
# Connect encoder counts to all joints (only enabled one will move)
net mpg-counts <= hm2_7i80.0.encoder.03.count
net mpg=counts joint.0.jog-counts axis.x.jog-counts
net mpg-counts joint.1.jog-counts axis.z.jog-counts
Is this how it could work to use the AXIS-GUI pins instead of an axis and a increment selctor switches?
Sigi
# Set jog-vel-mode to false (joint will move exactly jog-scale units for each count)
setp joint.0.jog-vel-mode 0
setp joint.1.jog-vel-mode 0
setp axis.x.jog-vel-mode 0
setp axis.z.jog-vel-mode 0
# Set jog scale
setp mpg-scale 1.0
net mpg-scale joint.0.jog-scale axis.x.jog-scale <= halui.axis.selected.increment
net mpg-scale joint.1.jog-scale axis.z.jog-scale <= halui.axis.selected.increment
# Joint selection (enable only one at a time)
net mpg-select-x joint.0.jog-enable axis.x.jog-enable <= halui.axis.selected.0
net mpg-select-z joint.1.jog-enable axis.z.jog-enable <= halui.axis.selected.1
# Connect encoder counts to all joints (only enabled one will move)
net mpg-counts <= hm2_7i80.0.encoder.03.count
net mpg=counts joint.0.jog-counts axis.x.jog-counts
net mpg-counts joint.1.jog-counts axis.z.jog-counts
Is this how it could work to use the AXIS-GUI pins instead of an axis and a increment selctor switches?
Sigi
Please Log in or Create an account to join the conversation.
Moderators: piasdom
Time to create page: 0.081 seconds