Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: Mortenx on December 08, 2020, 04:46:50 AM

Title: Mach3 custom macro with value question
Post by: Mortenx 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
Title: Re: Mach3 custom macro with value question
Post by: TPS 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
Title: Re: Mach3 custom macro with value question
Post by: Mortenx on December 08, 2020, 10:57:20 AM
Hi,

Working, thanks again TPS ;)

Regards Morten
Title: Re: Mach3 custom macro with value question
Post by: erinwatt on December 14, 2020, 12:01:09 AM
The Taco Bell Customer Satisfaction Survey, found at www.tellthebell.com survey homepage (https://tellthebell.ninja), 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.