Gscreen - a GTK / Glade / Python based screen
- mariusl
- Offline
- Platinum Member
-
Less
More
12 years 4 months ago #47880
by mariusl
Regards
Marius
www.bluearccnc.com
Replied by mariusl on topic Gscreen - a GTK / Glade / Python based screen
Chris
Will it work if I write a component to handle the jogging through the HALUI pins? Then we need only to get the jog speed from Gscreen and the rest can be done via HALUI.
Will it work if I write a component to handle the jogging through the HALUI pins? Then we need only to get the jog speed from Gscreen and the rest can be done via HALUI.
Regards
Marius
www.bluearccnc.com
Please Log in or Create an account to join the conversation.
- mariusl
- Offline
- Platinum Member
-
12 years 4 months ago - 12 years 4 months ago #47893
by mariusl
Regards
Marius
www.bluearccnc.com
Replied by mariusl on topic Gscreen - a GTK / Glade / Python based screen
I have written a demultiplexer component that will connect the joystick pins to HALUI jog increment pins. The HALUI increment value is obtained from the Gscreen.jog-increment-out pin.
HALUI jog does not work when the increment is set to 0 as would be the case when the jog continues is selected. I use a comparator to look at the jog-increment value and if it compares to 0, it sets the output of the comparator. The comparator output is connected to the select pin of a 1 to 2 demultiplexer that will connect the jog pins directly to the gcsreen jog pins only in the case of when jogging continues is selected. In all other cases HALUI will jog at the selected increment (from screen button)
All that is needed now is the jog-speed pin that will connect to HALUI jog-speed
I hope this makes sense.
EDIT: come to think of it, I dont know if the pin is needed now.
HALUI jog does not work when the increment is set to 0 as would be the case when the jog continues is selected. I use a comparator to look at the jog-increment value and if it compares to 0, it sets the output of the comparator. The comparator output is connected to the select pin of a 1 to 2 demultiplexer that will connect the jog pins directly to the gcsreen jog pins only in the case of when jogging continues is selected. In all other cases HALUI will jog at the selected increment (from screen button)
All that is needed now is the jog-speed pin that will connect to HALUI jog-speed
I hope this makes sense.
EDIT: come to think of it, I dont know if the pin is needed now.
Regards
Marius
www.bluearccnc.com
Last edit: 12 years 4 months ago by mariusl.
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
-
Less
More
- Posts: 19899
- Thank you received: 4655
12 years 4 months ago #47894
by andypugh
Is this different from: www.linuxcnc.org/docs/devel/html/man/man9/bitslice.9.html ?
Replied by andypugh on topic Gscreen - a GTK / Glade / Python based screen
mariusl wrote: I have written a demultiplexer component that will connect the joystick pins to HALUI jog increment pins..
Is this different from: www.linuxcnc.org/docs/devel/html/man/man9/bitslice.9.html ?
Please Log in or Create an account to join the conversation.
- mariusl
- Offline
- Platinum Member
-
12 years 4 months ago #47897
by mariusl
Regards
Marius
www.bluearccnc.com
Replied by mariusl on topic Gscreen - a GTK / Glade / Python based screen
Yes it is just a comp that take one bit in and connects it to a bit out. The number of which is determined by the select pin value. The opposite of a multiplexer.
It solves a specific problem with jogging controls on the Gscreen when you do not use a MPG. Using this method (that I will post once tested fully), I can jog at the screen selected increment but making use of HALUI as the Gscreen does not have external jog pins. Apart from the MPG interface. This way I can jog with a simple joystick and have the on screen functionality of the increment settings.
It solves a specific problem with jogging controls on the Gscreen when you do not use a MPG. Using this method (that I will post once tested fully), I can jog at the screen selected increment but making use of HALUI as the Gscreen does not have external jog pins. Apart from the MPG interface. This way I can jog with a simple joystick and have the on screen functionality of the increment settings.
Regards
Marius
www.bluearccnc.com
Please Log in or Create an account to join the conversation.
- mariusl
- Offline
- Platinum Member
-
12 years 4 months ago - 12 years 4 months ago #47900
by mariusl
Regards
Marius
www.bluearccnc.com
Replied by mariusl on topic Gscreen - a GTK / Glade / Python based screen
Ok I think I have it sorted. With the attached component and the HAL file, you can connect separate external jog switches ( a joystick in my case) to Gscreen and use the on screen increment selector to jog with.
Code:
loadrt comp count=4
addf comp.0 servo-thread
addf comp.1 servo-thread
addf comp.2 servo-thread
addf comp.3 servo-thread
loadrt demux2 count=4
addf demux2.0 servo-thread
addf demux2.1 servo-thread
addf demux2.2 servo-thread
addf demux2.3 servo-thread
net inc-select gscreen.jog-increment-out comp.0.in0 comp.1.in0 comp.2.in0 comp.3.in0
net inc-select halui.jog.0.increment
net inc-select halui.jog.2.increment
### X AXIS PLUS JOG ###
net jog-x-pos demux2.0.in0
setp comp.0.in1 0
net x-sel-out comp.0.equal demux2.0.sel
net x-plus-inc demux2.0.out0 halui.jog.0.increment-plus
net x-plus-cont demux2.0.out1 halui.jog.0.plus
### X AXIS MINUS JOG ###
net jog-x-neg demux2.1.in0
setp comp.1.in1 0
net x-sel-out demux2.1.sel
net x-minus-inc demux2.1.out0 halui.jog.0.increment-minus
net x-minus-cont demux2.1.out1 halui.jog.0.minus
### Z AXIS PLUS JOG ###
net jog-z-pos demux2.2.in0
setp comp.2.in1 0
net z-sel-out comp.2.equal demux2.2.sel
net z-plus-inc demux2.2.out0 halui.jog.2.increment-plus
net z-plus-cont demux2.2.out1 halui.jog.2.plus
### Z AXIS MINUS JOG ###
net jog-z-neg demux2.3.in0
setp comp.3.in1 0
net z-sel-out demux2.3.sel
net z-minus-inc demux2.3.out0 halui.jog.2.increment-minus
net z-minus-cont demux2.3.out1 halui.jog.2.minus
Regards
Marius
www.bluearccnc.com
Last edit: 12 years 4 months ago by mariusl.
Please Log in or Create an account to join the conversation.
- mariusl
- Offline
- Platinum Member
-
12 years 4 months ago #47905
by mariusl
Regards
Marius
www.bluearccnc.com
Replied by mariusl on topic Gscreen - a GTK / Glade / Python based screen
Can someone explain to me how to use Zero Origin and Offset Origin please.
Regards
Marius
www.bluearccnc.com
Please Log in or Create an account to join the conversation.
Time to create page: 1.915 seconds