Hello Guest it is April 22, 2021, 08:02:29 AM

Author Topic: Mach3 custom macro with value question  (Read 147 times)

0 Members and 1 Guest are viewing this topic.

Mach3 custom macro with value question
« on: December 08, 2020, 04:46:50 AM »
Hi all,

I have a lathe with 2 vfd's one for the spindle and one for a livetool, I use a custom macro M133 to activate an output that then goes via modbus to the livetool inverter, the speed for the livetool I take from the spindle DRO, as the spindle does not work while in C axis mode, I have an electrical clutch that connects a nema 34 to the C-axis - all this works just fine.

But, the spindle have a max rpm, and the livetool a higher rpm, is there anyway to say I could do something like this:

M133 P2500

that "P" value could be another rpm register, or just take that value to the M133 and set in in there?


Regards Morten

Offline TPS

*
  •  2,113 2,113
    • View Profile
Re: Mach3 custom macro with value question
« Reply #1 on: December 08, 2020, 05:26:07 AM »
RPM = Param1()

within the macro will read the value from P Parameter

if you call

Code: [Select]
M133 P2500

and in the macro:
Code: [Select]
RPM = Param1()

the RPM will be 2500

see:  www.machsupport.com/wp-content/uploads/2013/02/Mach3_V3.x_Macro_Prog_Ref.pdf
« Last Edit: December 08, 2020, 05:28:39 AM by TPS »
anything is possible, just try to do it.
if you find some mistakes, in my bad bavarian english,they are yours.
Re: Mach3 custom macro with value question
« Reply #2 on: December 08, 2020, 10:57:20 AM »
Hi,

Working, thanks again TPS ;)

Regards Morten
Re: Mach3 custom macro with value question
« Reply #3 on: December 14, 2020, 12:01:09 AM »
The Taco Bell Customer Satisfaction Survey, found at www.tellthebell.com survey homepage, is a short, online survey designed by Taco Bell to give customers the chance to leave feedback on their recent experience. Through this tellthebell.com survey, the company wants your genuine feedback about your recent visit, which is very important for the company to make their service and product quality better for you.