[ANGLEJOG] 2ax lathe MPG with X & Z jogging + Anglejog wiring advice

More
09 Jan 2024 03:02 #290255 by Mecanix
Hi experts. I've added the anglejog component signals to my existing MPG (hal), which works perfectly fine, however anglejog hijacks both the axis.x/z.jog-enable and axis.x/y.jog-scale signals. 

Being a total noob with HAL I'm hoping if you guys could be kind enough to have a look and give me pointers as to how to rewire this. My goal is to have a MPG that service both the X and Z independently, and when the axis selector is set on the A axis the MPG service angle jogging.

I just don't know the best way forward in rewiring the jog-enable and jog-scale pins - tried combinations of and2/not/xor/or logics but failed. Any advice would be greatly appreciated. 
Attachments:

Please Log in or Create an account to join the conversation.

More
09 Jan 2024 08:15 - 09 Jan 2024 08:19 #290264 by Mecanix
Ignore this. Although you can rewire using the set-up below, which works great, you can't have both anglejog and independent xz on the same mpg/hal. Gets pretty messy and so I've abandoned this idea and reverted back to the xz mpg. 

loadrt mux8 names=mpg-axis
addf mpg-axis servo-thread

#net x-jog-select     axis.x.jog-enable <= [CARD](NAME).gpio.00.in-not
#net z-jog-select     axis.z.jog-enable <= [CARD](NAME).gpio.02.in-not
### REWIRED
net x-jog-select or2.2.in0 <= [CARD](NAME).gpio.00.in-not
net z-jog-select or2.3.in0 <= [CARD](NAME).gpio.02.in-not
net a-jog-select or2.2.in1 or2.3.in1 <= anglejog.enable-in <= [CARD](NAME).gpio.03.in-not
net axis_x mpg-axis.sel0 axis.x.jog-enable <= or2.2.out
net axis_z mpg-axis.sel1 axis.z.jog-enable <= or2.3.out
 
Last edit: 09 Jan 2024 08:19 by Mecanix.

Please Log in or Create an account to join the conversation.

More
09 Jan 2024 08:43 #290265 by pippin88
I know nothing about anglejog, but it doesn't sound right that you can't also do independent X Z jogging (with selection via a switch) if using anglejog.

You may need to connect / disconnect some pins

Please Log in or Create an account to join the conversation.

More
09 Jan 2024 09:14 - 09 Jan 2024 09:23 #290266 by Mecanix
You actually can, I made it work (sort of) however the scaling & accel are conflicting with the set-up (errormuch). As you've guessed, signals needs to be enabled/disabled, among other things. Seems like a whole lot of work involved to get it right, and sadly this exceeds my level of expertise.

Easier to load the author's provided pyvcp with the ui inputs via INI when anglejog is required, and unload it and restore the XZ MPG when done. 

[DISPLAY]
PYVCP = ./anglejog.xml

[HAL]
POSTGUI_HALFILE = ./anglejog_postgui.hal
Attachments:
Last edit: 09 Jan 2024 09:23 by Mecanix.

Please Log in or Create an account to join the conversation.

Time to create page: 0.071 seconds
Powered by Kunena Forum