Hello Guest it is March 28, 2024, 01:35:54 PM

Author Topic: Any Lua programming consultants out there?  (Read 1099 times)

0 Members and 1 Guest are viewing this topic.

Any Lua programming consultants out there?
« on: June 06, 2019, 05:31:28 PM »
I submitted a help ticket and also paid for some phone support a week ago but haven't received any word back from the guys at Artsoft.  I'm hoping someone on this forum is a Lua expert and willing to assist with my Laser tube cutter / welding project where I'm trying to change the steps/unit for the rotary axis based on the diameter of the tube that I'm using.

If you have Mach4 and Lua programming skills and think you can help with my project, please let me know your availability and hourly rate.  Contact me directly at: bhauck68 (at) gmail.com

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: Any Lua programming consultants out there?
« Reply #1 on: June 07, 2019, 02:39:11 PM »
What you are trying to do is emulate the Haas G107 function. Not many will have teh experience in doing that. I did it for Mach3 and several OTHER DIY controllers. I remember doing it for Mach4 but don't remember where I stored teh code(Macro).

Basically you are just resetting teh step/per based on teh diameter of teh part in teh rotary axis .  Steps per /diameter of part.

It basically works like this M107 Pxx.********* where teh P parameter is teh part diameter.

Hopefully that will help someone that wants to try to make it for you.

(;-) TP
Re: Any Lua programming consultants out there?
« Reply #2 on: June 07, 2019, 04:52:20 PM »
Hi,
there is an API that allows you to change the steps per unit:

Quote
LUA Syntax:
rc = mc.mcMotorSetCountsPerUnit(
      number mInst,
      number motorId,
      number counts)

One concern that I would have about using this API is that once you changed the steps/per for your rotary axis it would
have to be flushed out to motion controller.

I broadly understand what you want to do and why but I'm not convinced that changing the steps per is the right approach.

Imagine you have a car that has a fixed throttle. To go fast you stop and bolt on large diameter wheels or to go slow
you bolt on small wheels. That is the equivalent of changing the steps per unit.

You may have seen discussion on the forum about CSS, (constant surface speed). It is generally thought of as a lathe feature.
The idea is that the spindle increases its speed as the diameter of the cut reduces so that the surface cutting speed remains the same.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: Any Lua programming consultants out there?
« Reply #3 on: June 07, 2019, 08:54:32 PM »
The issue is NOT about speed but about distance traveled per step so that the rotary axis travels teh appropiate surface distance per rev.

(;-) TP
Re: Any Lua programming consultants out there?
« Reply #4 on: June 07, 2019, 09:18:10 PM »
Hi,
which is equivalent to a constant surface speed.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: Any Lua programming consultants out there?
« Reply #5 on: June 07, 2019, 10:50:16 PM »
Which has nothing to do with teh conversation (;-) Teh function simply reprograms the steps per so that teh  axis will move the distance of the  part circumferance in one revolution.

Same as with a rotary axis in degs. Step/per /360 deg = steps per degree. IF programed as G0 A 360 it will move exactly 360 degrees.

The G107 function when configured to part circumference steps/per / Part Circumference and programmed as G0 A2.111 will move exactly 2.111" at teh surface of the part.

Been there done that, (;-) TP