Machsupport Forum
Mach Discussion => Mach4 General Discussion => Topic started by: chuck767 on October 26, 2022, 12:08:49 AM
-
Recently converted over to Mach 4 from Mach3
In Mach3, I frequently used the scaling features by simply typing in the scaling factor for the X,Y or Z axis.
In Mach4 I was introduced to M51 for scaling.
Has anybody automated this in the form of a “button/window“on the main screen?
Thanks for any help here.
Chuck
-
I think you are referring to g51.
I use an mc.AxisSetScale with a camera that finds fiducials and scales the x and y accordingly.
This is where it sets the scaling.
--calculate y scale amount
ScaleAmountY = (BCOffTtlLnth / BCGcdTtlLnth)
--set x scale amount
mc.mcAxisSetScale(inst, 1, ScaleAmountY)
-
You’re correct I did mean G 51.
Please tell me more about the axis set scale, I am not familiar with it.
-
Like in my code i showed you i set a variable and then set the scaling to that variable.
A value of 1 is 100%
-
Thanks, being new to Mach4 I think this is beyond my comprehension this time.
-
You will have to do some coding.
It does appear much harder than it is once you have started.
Here is a link for a document I made as I was learning how to do it.
It should help you.
https://www.machsupport.com/forum/index.php?action=dlattach;topic=43260.0;attach=54239
-
Thanks, I appreciate your input.
So far I am very impressed with Mach4 and want to learn more about using all of its capabilities.
-
Tell me more about “ camera that finds fiducials”
Thanks,
Chuck
-
It finds some dots printed on material and adjusts the scaling for x and y and compensates for rotation.
Lot of math.
-
Here is the code.
I use a lot over variables and some registers but you might be able to follow it.
-
Thanks, very impressive.