11311
General Mach Discussion / Re: variable pitch pulley and cnc drive
« on: July 01, 2011, 02:57:18 PM »
The macro wouldnt really be a problem, all you would be doing is treating the stepper as an axis and commanding it to move a set amount of steps depending on the speed you call.
Say for example you homed the axis so it was at the slowest speed then that would set that axis machine coords as zero.
Say that "zero" position was equal to 50 rpm and to get 100rpm you needed to move the stepper 10 units and 150 rpm needed 50 units from the zero then the macro would have something like
If GetRPM= 50 Then
Code "G0A0"
End If
If GetRPM= 100 Then
Code "G0A10"
End If
If GetRPM = 150 Then
Code "G0A150"
End If
and so on.
The thing is you would really need to home each time you started Mach although I suppose it shouldnt really change much and having persistent DROs should keep the values in the DRO. Maybe over time it would drift but would be easy to command a move to slowest speed or below via MDI then set the machine coords for the axis zero again.
Doing things this way would mean really you would need to command speeds in specific numbers such as S50, S100, S150, S200 etc or whatever steps you thought suitable whilst remembering the closer the speed steps were the larger and more cumbersome your macro would be.
Hope this makes sense, its kind of hard to explain whats in my head sometimes
Hood
Say for example you homed the axis so it was at the slowest speed then that would set that axis machine coords as zero.
Say that "zero" position was equal to 50 rpm and to get 100rpm you needed to move the stepper 10 units and 150 rpm needed 50 units from the zero then the macro would have something like
If GetRPM= 50 Then
Code "G0A0"
End If
If GetRPM= 100 Then
Code "G0A10"
End If
If GetRPM = 150 Then
Code "G0A150"
End If
and so on.
The thing is you would really need to home each time you started Mach although I suppose it shouldnt really change much and having persistent DROs should keep the values in the DRO. Maybe over time it would drift but would be easy to command a move to slowest speed or below via MDI then set the machine coords for the axis zero again.
Doing things this way would mean really you would need to command speeds in specific numbers such as S50, S100, S150, S200 etc or whatever steps you thought suitable whilst remembering the closer the speed steps were the larger and more cumbersome your macro would be.
Hope this makes sense, its kind of hard to explain whats in my head sometimes
Hood