Hello Guest it is April 23, 2024, 03:47:42 AM

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Mauri

Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 »
131
Mach4 General Discussion / Re: Setting Motor Counts Per Unit in macro
« on: January 14, 2018, 09:27:35 PM »
Craig,
This is what I would like as lua script to make this work.

local radius=mc.mcAxisGetPos(inst,mc.Z_AXIS)
if radius==0 then radius=1 end
local surfacespeed=mc.mcCntlGetPoundVar(inst,2134)
local spinspeed=surfacespeed/((2*3.141592654*radius)/360)
if spinspeed>=1500 then spinspeed=1500 end

local mInst = 0;
local param = number for A Axis Velocity ???;
local value=A Axis Velocity (spinspeed);
mc.mcCntlSetPoundVar(mInst, param, value);

This would be an ideal way of having variable A Axis speed based on Z Axis radius.
However it may not work for 2 reasons.
1) There may not be any # Variable for A axis Velocity.
2) If there is it may not be allowed to be used while processing the G-Code or it may take affect after the next move as it does with #2134.

If there are any experts, on this, out there it would be great if they gave us some help.

Regards,
Mauri.

132
Mach4 General Discussion / Re: Setting Motor Counts Per Unit in macro
« on: January 14, 2018, 05:48:07 PM »
Craig,
Yes I do have speed limits on my spindle set in Mach4 8000 min and 24000 max.
Are there any # variable that contain Velocity for the A Axis motor or is there a Fspeed # variable for A Axis?
Regards,
Mauri.

133
Mach4 General Discussion / Re: Setting Motor Counts Per Unit in macro
« on: January 14, 2018, 04:50:46 PM »
Craig,
That sounds more promising, as the other method just will not work for me.
I do not want to go back and control my main spindle manually.
My test would not allow the MPG to work on the A Axis and I could not see how Homing or Limits would work.
So unless a Mach4 Guru or the Mach4 programmer comes up with a solution that will allow all the proper functions to operate with A Axis and the Spindle and provide a way to make the A Axis using the Z Axis to change its speed, I will stay with Mach3 on our Router Table and not bother with the 4th Axis on our Mill.
May be before I hit the bucket someone will do this for us all.
Thanks Craig.
Regards,
Mauri.

134
Mach4 General Discussion / Re: Setting Motor Counts Per Unit in macro
« on: January 13, 2018, 06:56:13 PM »
Craig,
So what happens to my normal spindle that my cutter is on, will it be affected by this code?
Regards,
Mauri.

135
Mach4 General Discussion / Re: Setting Motor Counts Per Unit in macro
« on: January 13, 2018, 06:51:07 PM »
Craig,
Am I supposed to enter the LUA Syntax somewhere?
rc = mc.mcSpindleSetCommandRPM(
      number mInst,
      number RPM)
Regards,
Mauri.

136
Mach4 General Discussion / Re: Setting Motor Counts Per Unit in macro
« on: January 13, 2018, 06:49:07 PM »
Craig,
I think I was typing my note at the same time as you.
Regards,
Mauri.

137
Mach4 General Discussion / Re: Setting Motor Counts Per Unit in macro
« on: January 13, 2018, 06:47:41 PM »
Craig,
Thanks for the reply.
So how does Mach3 do it with the A Axis just being a normal stepper motor setup?
How would I be able to setup my stepper as a spindle just using Mach4 when the code you provided affects the real spindle and not the A axis?
Need some more help here.
Regards,
Mauri.

138
Mach4 General Discussion / Re: Setting Motor Counts Per Unit in macro
« on: January 13, 2018, 06:15:11 PM »
Craig,
Test File I used.
G00 G49 G40 G80 G50 G90 G64 G21
G01 Z5.000 F400 -- changed Z to different values
G01 A360.000
G01 Z0.000
G01 A0.000
M30
I did some more testing to see what changes appear in Mach4.
The #2134 goes to 400.
The Spindle which started up at 8000 on the Mach4 Screen went to 15900 after the program had reached A360 and was about do go to zero on Z and A Axis.
So why is my spindle affected by this PLC code and not the A Axis?
Regards,
Mauri.

139
Mach4 General Discussion / Re: Setting Motor Counts Per Unit in macro
« on: January 13, 2018, 05:51:09 PM »
Craig,
I setup a our old test Controller with ESS and a Motor connected to the A Axis on our bench and first ran some test code on Mach3 and timed it at various radius sizes and it worked perfectly as usual. Fast when the radius is small and slower and slower as when the radius was set large and larger.
It is also very accurate when doing a manual calculation comparing to its actual time to complete.
To do this you have to have a setting of .0001 in the Mach3 Setup for the A axis.

I then entered your PLC code into Mach4 screen under PLC and performed the same test.
The result was no speed change no mater what Z Axis radius was set and no time difference apart from the Z Axis Radius move variation.
The A Axis motor never changes speed.
So something is missing here.
Did you test it?
Regards,
Mauri.

140
Mach4 General Discussion / Re: Setting Motor Counts Per Unit in macro
« on: January 12, 2018, 05:57:35 PM »
Craig,
If we are to do this we would need your help.
Variable A Axis Velocity Degrees Per Min = Fspeed UnitPerMin in Gcode/(VariableRadiusZaxis x 4 x Pi())/360
A axis in my case is not to exceed Velocity Degrees Per Min 15900 using a 15:1 ratio on Router Table.
So at its smallest radius it must not exceed 15900.
The larger the radius the smaller the Velocity Degrees Per Min.
For example.
F2500 mm/min
Radius Z Axis = 50mm (100mm dis part)
Velocity Degrees Per Min = 1432.3945

Radius Z Axis = 4.504mm (smallest allowed to maintain 15900)
Velocity Degrees Per Min = 15900

Any lower in Radius Z Axis, then Velocity Degrees Per Min must not go any lower than 15900.
Natually a fixed F2500 is only good for about Z 25mm.

Variable A Axis Velocity Degrees Per Min = Fspeed UnitPerMin in Gcode/(VariableRadiusZaxis x 4 x Pi())/360
if Variable A Axis Velocity Degrees Per Min > 15900 then Velocity Degrees Per Min = 15900

Not sure how you could implement this.
Each Gcode Program would have different X/Y Fspeed so this must be read into the program code also The Z Axis value would also have to be read in as part of the calculation.
Then the A Axis Velocity Degrees Per Min would have to be continually changed in the Mach4 registry as this program and CNC machines progresses through the Gcode.

Can you help with this for us?

Regards,
Mauri.



Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 »