Hello Guest it is April 28, 2024, 06:05:51 AM

Author Topic: Mach4 scaling using M51  (Read 688 times)

0 Members and 1 Guest are viewing this topic.

Mach4 scaling using M51
« 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

Offline Bill_O

*
  •  563 563
    • View Profile
Re: Mach4 scaling using M51
« Reply #1 on: October 26, 2022, 08:36:31 AM »
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)
Re: Mach4 scaling using M51
« Reply #2 on: October 26, 2022, 09:49:15 AM »
You’re correct I did mean G 51.

Please tell me more about the axis set scale, I am not familiar with it.

Offline Bill_O

*
  •  563 563
    • View Profile
Re: Mach4 scaling using M51
« Reply #3 on: October 26, 2022, 09:52:28 AM »
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%
Re: Mach4 scaling using M51
« Reply #4 on: October 26, 2022, 10:01:12 AM »
Thanks, being new to Mach4 I think this is beyond my comprehension this time. 

Offline Bill_O

*
  •  563 563
    • View Profile
Re: Mach4 scaling using M51
« Reply #5 on: October 26, 2022, 10:18:30 AM »
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
Re: Mach4 scaling using M51
« Reply #6 on: October 26, 2022, 10:25:51 AM »
Thanks, I appreciate your input.

So far I am very impressed with Mach4 and want to learn more about using all of its capabilities.
Re: Mach4 scaling using M51
« Reply #7 on: October 31, 2022, 05:14:25 PM »
Tell me more about “ camera that finds fiducials”

Thanks,
Chuck

Offline Bill_O

*
  •  563 563
    • View Profile
Re: Mach4 scaling using M51
« Reply #8 on: November 01, 2022, 07:52:40 AM »
It finds some dots printed on material and adjusts the scaling for x and y and compensates for rotation.
Lot of math.

Offline Bill_O

*
  •  563 563
    • View Profile
Re: Mach4 scaling using M51
« Reply #9 on: November 01, 2022, 09:32:52 AM »
Here is the code.
I use a lot over variables and some registers but you might be able to follow it.