Probe Basic - jog slider & status
21 Jan 2023 17:01 #262592
by Lcvette
Replied by Lcvette on topic Probe Basic - jog slider & status
Yes, in machine_actions.py, there is also an exposed hal file, it appears the jog slider hal will need to be exposed to connect in the ui externally. Maybe @turboss or @joco or @hazzy can have a look. I stayed tinkering with it this morning, but have some pressing work to get out and won't be able to tinker with it until next weekend if I'm lucky.
The following user(s) said Thank You: spumco
Please Log in or Create an account to join the conversation.
21 Jan 2023 17:03 #262593
by spumco
FRO & SRO are controlled from two sources:
#FEED OVERRIDE BUTTONS & MPG
setp mux2.1.in0 0.1 #PUSHBUTTON SCALE
setp mux2.1.in1 0.01 #MPG SCALE
net FRO-SELECT => halui.feed-override.count-enable #MPG SELECTED
net MPG-ENCODER-COUNT => halui.feed-override.counts #MPG ENCODER
net FRO-SELECT => mux2.1.sel #SELECT FROM PUSHBUTTON OR MPG SCALE BASED ON SWITCH POS
net FRO-SCALE <= mux2.1.out
net FRO-SCALE => halui.feed-override.scale
net BTN-FRO-DEC => halui.feed-override.decrease #PUSHBUTTON -10%
net BTN-FRO-INC => halui.feed-override.increase #PUSHBUTTON +10%
net BTN-FRO-RESET => halui.feed-override.reset #PUSHBUTTON RESET
net FRO-VALUE-OUT <= halui.feed-override.value #LED INDICATOR LOGIC OUTPUT
#FEED OVERRIDE LED
setp wcomp.0.min .99
setp wcomp.0.max 1.01
setp blink.0.on-time 50
setp blink.0.off-time 50
net FRO-VALUE-OUT => wcomp.0.in
net LED-FRO-SOLID <= wcomp.0.out
net LED-FRO-BLINK1 <= wcomp.0.over
net LED-FRO-BLINK2 <= wcomp.0.under
net LED-FRO-BLINK1 => or2.2.in0
net LED-FRO-BLINK2 => or2.2.in1
net LED-FRO-BLINKENABLE <= or2.2.out
net LED-FRO-BLINKENABLE => blink.0.enable
net LED-FRO-BLINKING <= blink.0.blink-on
net LED-FRO-SOLID => or2.3.in0
net LED-FRO-BLINKING => or2.3.in1
net LED-FRO-ON <= or2.3.out
net LED-FRO-ON => and2.7.in0
net MACHINE-IS-ON => and2.7.in1
net LED-FRO-OUT <= and2.7.out
Rapid
#RAPID OVERRIDE BUTTONS
setp halui.rapid-override.direct-value false
setp halui.rapid-override.count-enable true
setp mux4.rro.in0 100
setp mux4.rro.in1 21 #SLIGHT OFFSET REQUIRED FOR SCALE TO CALCULATE PROPERLY
setp mux4.rro.in2 6 #SLIGHT OFFSET REQUIRED FOR SCALE TO CALCULATE PROPERLY
setp halui.rapid-override.scale 0.01
net BTN-RRO-RESET => halui.rapid-override.reset
net RRO-OUT-20 => mux4.rro.sel0 #SIGNAL FROM CLASSIC LADDER
net RRO-OUT-5 => mux4.rro.sel1 #SIGNAL FROM CLASSIC LADDER
net RRO-S32-CONV <= mux4.rro.out
net RRO-S32-CONV => conv-float-s32.1.in
net RRO-VALUE <= conv-float-s32.1.out
net RRO-VALUE => halui.rapid-override.counts
net RRO-VALUE-OUT <= halui.rapid-override.value
#RAPID OVERRIDE BUTTON LEDS
net MACHINE-IS-ON => and2.3.in0
net LED-RRO100 => and2.3.in1 #SIGNAL FROM CLASSIC LADDER
net LED-RAPID-RESET <= and2.3.out #LED ILLUMINATED ONLY WHEN MACHINE IS ON
net MACHINE-IS-ON => and2.4.in0
net LED-RRO20 => and2.4.in1 #SIGNAL FROM CLASSIC LADDER
net LED-RAPID-20 <= and2.4.out #LED ILLUMINATED ONLY WHEN MACHINE IS ON
net MACHINE-IS-ON => and2.5.in0
net LED-RRO5 => and2.5.in1 #SIGNAL FROM CLASSIC LADDER
net RRO-RAPID-5 <= and2.5.out #LED ILLUMINATED ONLY WHEN MACHINE IS ON
JRO is controlled only from MPG encoder & selector
# JOG CONTINUOUS - MPG SPEED ADJUST
setp knob2float.0.max-out 100.0
setp knob2float.0.min-out 0.0
setp knob2float.0.scale 1
net JOG-CONT-SELECT => knob2float.0.enable
net MPG-ENCODER-COUNT => knob2float.0.counts
net JOG-SPEED-OUT <= knob2float.0.out
net JOG-SPEED-OUT => halui.axis.jog-speed => halui.joint.jog-speed
And what I don't have - and would like - is an on-screen indicator showing the jog speed value.
NOTE - blink.comp is a user-created hal component I found published in the forum from years ago. Dead useful and really cuts down on verbosity when trying to get someting to turn off/on at intervals. It's so easy to use it probably should be added to the LCNC mainline components.
Replied by spumco on topic Probe Basic - jog slider & status
Just in case you still want this. All overrides are connected through halui.can you show how you have your other overrides connected? im looking into it but would help to see what you have setup.
FRO & SRO are controlled from two sources:
- +10%/-10%/Reset physical buttons
- MPG encoder w/selector switch
- LED's that flash when override is not at 100%
Warning: Spoiler!
#FEED OVERRIDE BUTTONS & MPG
setp mux2.1.in0 0.1 #PUSHBUTTON SCALE
setp mux2.1.in1 0.01 #MPG SCALE
net FRO-SELECT => halui.feed-override.count-enable #MPG SELECTED
net MPG-ENCODER-COUNT => halui.feed-override.counts #MPG ENCODER
net FRO-SELECT => mux2.1.sel #SELECT FROM PUSHBUTTON OR MPG SCALE BASED ON SWITCH POS
net FRO-SCALE <= mux2.1.out
net FRO-SCALE => halui.feed-override.scale
net BTN-FRO-DEC => halui.feed-override.decrease #PUSHBUTTON -10%
net BTN-FRO-INC => halui.feed-override.increase #PUSHBUTTON +10%
net BTN-FRO-RESET => halui.feed-override.reset #PUSHBUTTON RESET
net FRO-VALUE-OUT <= halui.feed-override.value #LED INDICATOR LOGIC OUTPUT
#FEED OVERRIDE LED
setp wcomp.0.min .99
setp wcomp.0.max 1.01
setp blink.0.on-time 50
setp blink.0.off-time 50
net FRO-VALUE-OUT => wcomp.0.in
net LED-FRO-SOLID <= wcomp.0.out
net LED-FRO-BLINK1 <= wcomp.0.over
net LED-FRO-BLINK2 <= wcomp.0.under
net LED-FRO-BLINK1 => or2.2.in0
net LED-FRO-BLINK2 => or2.2.in1
net LED-FRO-BLINKENABLE <= or2.2.out
net LED-FRO-BLINKENABLE => blink.0.enable
net LED-FRO-BLINKING <= blink.0.blink-on
net LED-FRO-SOLID => or2.3.in0
net LED-FRO-BLINKING => or2.3.in1
net LED-FRO-ON <= or2.3.out
net LED-FRO-ON => and2.7.in0
net MACHINE-IS-ON => and2.7.in1
net LED-FRO-OUT <= and2.7.out
Rapid
- three physical buttons & mux: 5%/20%/Reset
- LEDs that indicated which value is active
Warning: Spoiler!
#RAPID OVERRIDE BUTTONS
setp halui.rapid-override.direct-value false
setp halui.rapid-override.count-enable true
setp mux4.rro.in0 100
setp mux4.rro.in1 21 #SLIGHT OFFSET REQUIRED FOR SCALE TO CALCULATE PROPERLY
setp mux4.rro.in2 6 #SLIGHT OFFSET REQUIRED FOR SCALE TO CALCULATE PROPERLY
setp halui.rapid-override.scale 0.01
net BTN-RRO-RESET => halui.rapid-override.reset
net RRO-OUT-20 => mux4.rro.sel0 #SIGNAL FROM CLASSIC LADDER
net RRO-OUT-5 => mux4.rro.sel1 #SIGNAL FROM CLASSIC LADDER
net RRO-S32-CONV <= mux4.rro.out
net RRO-S32-CONV => conv-float-s32.1.in
net RRO-VALUE <= conv-float-s32.1.out
net RRO-VALUE => halui.rapid-override.counts
net RRO-VALUE-OUT <= halui.rapid-override.value
#RAPID OVERRIDE BUTTON LEDS
net MACHINE-IS-ON => and2.3.in0
net LED-RRO100 => and2.3.in1 #SIGNAL FROM CLASSIC LADDER
net LED-RAPID-RESET <= and2.3.out #LED ILLUMINATED ONLY WHEN MACHINE IS ON
net MACHINE-IS-ON => and2.4.in0
net LED-RRO20 => and2.4.in1 #SIGNAL FROM CLASSIC LADDER
net LED-RAPID-20 <= and2.4.out #LED ILLUMINATED ONLY WHEN MACHINE IS ON
net MACHINE-IS-ON => and2.5.in0
net LED-RRO5 => and2.5.in1 #SIGNAL FROM CLASSIC LADDER
net RRO-RAPID-5 <= and2.5.out #LED ILLUMINATED ONLY WHEN MACHINE IS ON
JRO is controlled only from MPG encoder & selector
Warning: Spoiler!
# JOG CONTINUOUS - MPG SPEED ADJUST
setp knob2float.0.max-out 100.0
setp knob2float.0.min-out 0.0
setp knob2float.0.scale 1
net JOG-CONT-SELECT => knob2float.0.enable
net MPG-ENCODER-COUNT => knob2float.0.counts
net JOG-SPEED-OUT <= knob2float.0.out
net JOG-SPEED-OUT => halui.axis.jog-speed => halui.joint.jog-speed
And what I don't have - and would like - is an on-screen indicator showing the jog speed value.
NOTE - blink.comp is a user-created hal component I found published in the forum from years ago. Dead useful and really cuts down on verbosity when trying to get someting to turn off/on at intervals. It's so easy to use it probably should be added to the LCNC mainline components.
Please Log in or Create an account to join the conversation.
21 Jan 2023 21:51 #262612
by Lcvette
Replied by Lcvette on topic Probe Basic - jog slider & status
I had a thought, so i tried this solution out... i moved the linear job slider to the settings page with the new angular jog slider, i then added a hal slider on the main page and connected it to both the angular and linear jog slider. now the two sliders on the settings page work independently but can be globally adjusted from the main page halslider. the hal slider can be connected as it is now defined with a pin name. this should give you what you are looking for. the caveat is i have no hardware to test it with. and upon startup, without a hal signal being sent to it, it defaults to the properties base setting of 50% which is what i set it at. you can also add a status label for it if you would like. I am not going to publish this to the main PB branch as it requires an external override to function and remain synchronized. but it is a fairly easy edit to make on your own. i laid it out like this:
Attachments:
The following user(s) said Thank You: spumco
Please Log in or Create an account to join the conversation.
21 Jan 2023 22:17 #262615
by Lcvette
Replied by Lcvette on topic Probe Basic - jog slider & status
Attachments:
The following user(s) said Thank You: spumco
Please Log in or Create an account to join the conversation.
22 Jan 2023 00:33 #262622
by spumco
Replied by spumco on topic Probe Basic - jog slider & status
so switch like the following?
cd /something/probe_basic
git checkout jog_slide_testing
git pull
Would that do it? I've got no modifications on my local installation to save.
cd /something/probe_basic
git checkout jog_slide_testing
git pull
Would that do it? I've got no modifications on my local installation to save.
Please Log in or Create an account to join the conversation.
22 Jan 2023 03:35 #262628
by Lcvette
Replied by Lcvette on topic Probe Basic - jog slider & status
Been so long since I did it that way I forget, but that sounds about right, or you can install gitkraken, it's super easy for keeping up with things and checking out and editing things safely
Please Log in or Create an account to join the conversation.
22 Jan 2023 19:13 #262673
by spumco
Replied by spumco on topic Probe Basic - jog slider & status
git pull then git checkout... worked to get the test branch.
I can see the global jog-speed pin now, but the float is an OUT pin so I can't connect anything to it. I can watch it change value in halshow when I move the slider, but it doesn't respond to external inputs.
I know you're busy with stuff, no rush. Thanks for having a quick go at it.
-R
I can see the global jog-speed pin now, but the float is an OUT pin so I can't connect anything to it. I can watch it change value in halshow when I move the slider, but it doesn't respond to external inputs.
I know you're busy with stuff, no rush. Thanks for having a quick go at it.
-R
Please Log in or Create an account to join the conversation.
23 Jan 2023 03:33 #262701
by Lcvette
Replied by Lcvette on topic Probe Basic - jog slider & status
ok.... so.... @Turboss and I were brainstorming this and realized there is not a python interface for that function currently in linuxcnc. there is for spindle, feedrate and rapidrate overrides, but not for jog speed. Those being existing already within the python module are why those overrides just work and the jog does not. Because those are included we can connect them in the settings and status widgets and include them in rules for functionality both in the ui and physical world. This may be one of those requests you would need to make to the linuxcnc devs to include that in their python module code to be used on the ui side.
linuxcnc.org/docs/2.9/html/config/python-interface.html
linuxcnc.org/docs/2.9/html/config/python-interface.html
The following user(s) said Thank You: spumco
Please Log in or Create an account to join the conversation.
23 Jan 2023 05:34 #262716
by spumco
Replied by spumco on topic Probe Basic - jog slider & status
Well, that explains it. I'll seee if I can figure out how to put a request in on github.
Thanks to you and Turboss for looking in to it.
-R
Thanks to you and Turboss for looking in to it.
-R
The following user(s) said Thank You: Lcvette
Please Log in or Create an account to join the conversation.
23 Jan 2023 21:30 #262773
by Lcvette
Replied by Lcvette on topic Probe Basic - jog slider & status
yeah, bummer, hopefully they can add it in at some point, then we can use rules and existing widgets to connect to those signals!
Please Log in or Create an account to join the conversation.
Time to create page: 0.162 seconds