- Posts: 68
- Thank you received: 9
select jog axis
- TimP
- Offline
- Senior Member
-
Less
More
2 years 10 months ago #288873
by TimP
Replied by TimP on topic select jog axis
setting scale before counts didn't help. In every thread that i have seen there always was mention about proper order of loading elements, so how i can be sure they are loaded in proper order?
Please Log in or Create an account to join the conversation.
- rodw
- Offline
- Platinum Member
-
Less
More
- Posts: 12170
- Thank you received: 4153
2 years 10 months ago #288877
by rodw
Replied by rodw on topic select jog axis
Here is an example that decodes a 6 axis selector on a pendant that outputs a 3 bit output (3 pins). It uses a mux 8 and a select 
It also controls feed over ride and rapid override
You have to do a couple of data type conversions to make it work so its a bit long winded.
It also controls feed over ride and rapid override
You have to do a couple of data type conversions to make it work so its a bit long winded.
Code:
loadrt mux8 count=1
loadrt select8 count=1
loadrt conv_float_s32 names=pen-conv-float
loadrt conv_s32_bit names=pen-conv-s32
addf mux8.0 servo-thread
addf select8.0 servo-thread
addf pen-conv-float servo-thread
addf pen-conv-s32 servo-thread
#Axis Select (0=off, 1=x, 2=z, 3=y, na, 5=6, 6=4, 7=5)
setp mux8.0.in0 0
setp mux8.0.in1 1
setp mux8.0.in2 2
setp mux8.0.in3 3
setp mux8.0.in4 4
setp mux8.0.in5 5
setp mux8.0.in6 6
setp mux8.0.in7 7
net mux8-sel0 <= hm2_7i76e.0.7i76.0.0.input-13
net mux8-sel1 <= hm2_7i76e.0.7i76.0.0.input-14
net mux8-sel2 <= hm2_7i76e.0.7i76.0.0.input-15
net mux8-sel0 => mux8.0.sel0
net mux8-sel1 => mux8.0.sel1
net mux8-sel2 => mux8.0.sel2
setp pen-conv-float.clamp 0
net mux-float <= mux8.0.out
net mux-float => pen-conv-float.in
net mux-s32 <= pen-conv-float.out
net mux-s32 => select8.0.sel
net axis-select-x <= select8.0.out1
net axis-select-y <= select8.0.out3
net axis-select-z <= select8.0.out2
net axis-select-a <= select8.0.out6
net axis-select-5 <= select8.0.out7
net axis-select-6 <= select8.0.out5
net axis-select-x => axis.x.jog-enable
net axis-select-x => halui.axis.x.select
net axis-select-y => axis.y.jog-enable
net axis-select-y => halui.axis.y.select
net axis-select-z => axis.z.jog-enable
net axis-select-z => halui.axis.z.select
net axis-select-a => axis.a.jog-enable
net axis-select-a => halui.axis.a.select
net axis-select-5 => halui.feed-override.count-enable
net axis-select-6 => halui.rapid-override.count-enable
Please Log in or Create an account to join the conversation.
- TimP
- Offline
- Senior Member
-
Less
More
- Posts: 68
- Thank you received: 9
2 years 10 months ago #288921
by TimP
Replied by TimP on topic select jog axis
and it is also change those radio buttons on AXISUI?
because i kinda use same approach and in the end i set `axis.x.jog-enable` and `halui.axis.x.select` and it works but AXISUI doesn't reflect it in radio buttons.
because i kinda use same approach and in the end i set `axis.x.jog-enable` and `halui.axis.x.select` and it works but AXISUI doesn't reflect it in radio buttons.
Please Log in or Create an account to join the conversation.
- cmorley
- Offline
- Moderator
-
Less
More
- Posts: 7368
- Thank you received: 2181
2 years 10 months ago #288932
by cmorley
Replied by cmorley on topic select jog axis
Confirmed the override problem.
Since AXIS is not in it's update loop yet when postgui is called, I'm going to guess it doesn't notice the change nor sync state late enough.
Linuxcnc it's self has no concept of 'selected' joint/axis - only the GUIs do - and each one does it differently.
linuxcnc does have MPG axis/joint enable but that is probably not exactly what you meant and is separate from any other jogging mechanism.
AXIS has no default way to select axes/joints externally.
When you select axes/jog with halui pins, it's halui that is directing the jogging not AXIS or linuxcnc
There are ways to add HAL pins to AXIS to select axes using an axisrc file, but that comes with it's own potential problems.
Since AXIS is not in it's update loop yet when postgui is called, I'm going to guess it doesn't notice the change nor sync state late enough.
Linuxcnc it's self has no concept of 'selected' joint/axis - only the GUIs do - and each one does it differently.
linuxcnc does have MPG axis/joint enable but that is probably not exactly what you meant and is separate from any other jogging mechanism.
AXIS has no default way to select axes/joints externally.
When you select axes/jog with halui pins, it's halui that is directing the jogging not AXIS or linuxcnc
There are ways to add HAL pins to AXIS to select axes using an axisrc file, but that comes with it's own potential problems.
Please Log in or Create an account to join the conversation.
- TimP
- Offline
- Senior Member
-
Less
More
- Posts: 68
- Thank you received: 9
2 years 10 months ago #288939
by TimP
Replied by TimP on topic select jog axis
with slight modification of python script from
forum.linuxcnc.org/38-general-linuxcnc-q...lect?start=10#281577
it is working now at least jog selection
i don't know why but i thought that all UIs should use some hal signals for representation of data. So changing `halui.axis.x.select` should be used by UIs.
it is working now at least jog selection
i don't know why but i thought that all UIs should use some hal signals for representation of data. So changing `halui.axis.x.select` should be used by UIs.
Please Log in or Create an account to join the conversation.
- rodw
- Offline
- Platinum Member
-
Less
More
- Posts: 12170
- Thank you received: 4153
2 years 10 months ago #288941
by rodw
Replied by rodw on topic select jog axis
There is no need for a GUI to get involved with external hardware. Thats what halui is for.
When GUIs extend their scope, we get a mess with differing configs for no reason.
When GUIs extend their scope, we get a mess with differing configs for no reason.
Please Log in or Create an account to join the conversation.
Time to create page: 0.618 seconds