Hello
Guest
it is
May 24, 2025, 06:20:42 PM
Guest
Login
Register
Menu
Home
Help
Search
Login
Register
YouTube
Machsupport Forum
/
Mach Discussion
/
Mach4 General Discussion
/
Lua script to toggle/swap betweenC axis as spindle AND C as rotary axis
« previous
next »
Print
Pages:
1
Go Down
Author
Topic: Lua script to toggle/swap betweenC axis as spindle AND C as rotary axis (Read 17379 times)
0 Members and 1 Guest are viewing this topic.
omiadhi
15
Lua script to toggle/swap betweenC axis as spindle AND C as rotary axis
«
on:
September 22, 2023, 03:03:47 PM »
Hello everyone,
I am looking for Macro/ Lua script to TOGGLE between C axis as Spindle (OBB) accepts S command AND to index ROTORY axis when ever require and accept G code commands ,
Logged
omiadhi
15
Re: Lua script to toggle/swap betweenC axis as spindle AND C as rotary axis
«
Reply #1 on:
September 28, 2023, 09:45:46 AM »
Hai is there anyone have any idea
Logged
cncmagic
109
what me worry? heck...it ain't my machine anyway
Re: Lua script to toggle/swap betweenC axis as spindle AND C as rotary axis
«
Reply #2 on:
September 29, 2023, 07:23:53 PM »
why not simply define another axis as rotary.. I'm guessing you're using pulse and dir for both? otherwise you'd also need to change the mode of whatever drive you're using.. flip the axis thru a relay that simply swaps which pins go to the drive. Thats a cheap and dirty approach.. you'd probably need one of the more advanced users to actually point you in the direction of how to swap the axis internally to Mach4. Bob
Logged
any semblance of information posted to anything remotely close to accuracy is merely coincidence. Use at you own discretion.. or play the lottery.. same odds
omiadhi
15
Re: Lua script to toggle/swap betweenC axis as spindle AND C as rotary axis
«
Reply #3 on:
September 30, 2023, 05:58:28 AM »
I am just trying to make mill-turn, having basic 5 axis mill and A axis need to run as Spindle when in lathe mode , yes trying to have index axis and spindle are in STEP/ DIR input
Logged
omiadhi
15
Re: Lua script to toggle/swap betweenC axis as spindle AND C as rotary axis
«
Reply #4 on:
September 30, 2023, 06:04:18 AM »
I have seen codes
mc.AxisSetSpindle
mc.AxisMapMotor
mc.AxisUnmapMotor in Mach4 API core coding,
is these codes can work in user defined M code macros?.
Logged
cncmagic
109
what me worry? heck...it ain't my machine anyway
Re: Lua script to toggle/swap betweenC axis as spindle AND C as rotary axis
«
Reply #5 on:
September 30, 2023, 12:33:36 PM »
I'm not experienced enough to determine how these can and should be implemented.. you'll need someone a lot more involved in the API and with LUA to help. Bob
Logged
any semblance of information posted to anything remotely close to accuracy is merely coincidence. Use at you own discretion.. or play the lottery.. same odds
omiadhi
15
Re: Lua script to toggle/swap betweenC axis as spindle AND C as rotary axis
«
Reply #6 on:
September 25, 2024, 01:08:31 PM »
Hai cncmagic,
thanks for reply to my topics, i am about to solve this, soon i will upload lua code.
Logged
Print
Pages:
1
Go Up
« previous
next »