Hello Guest it is March 28, 2024, 06:22:04 PM

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 - Cbyrdtopper

311
Mach4 General Discussion / Re: Spindle Motor problems
« on: January 31, 2019, 04:47:11 PM »
Do you have a G50 Max/Min RPM Limit set?
Page 36 of the Lathe Programming manual:

Format: G50 S__ Q__
In this format S specifies the maximum spindle speed and Q specifies the minimum speed.

Put in a G50 S2500 and see if that changes anything.

312
Using this macro, I can change the jog to whatever I want, notice I am changing the Jog% for each motor.  It won't update the display if you try and change it below 50%.  Not sure why, this is a question for someone who knows more than me.

--Set Jog Rate
function m324()
local inst = mc.mcGetInstance()
local JogRate = 72.3   --Jog %
mc.mcJogSetRate(inst, 0, JogRate)  --Motor 0
mc.mcJogSetRate(inst, 1, JogRate)  --Motor 1
mc.mcJogSetRate(inst, 2, JogRate)  --Motor 2
mc.mcJogSetRate(inst, 3, JogRate)  --Motor 3

end --m324

if (mc.mcInEditor() == 1) then
 m324()
end

313
Mach4 General Discussion / Re: Stop a macro and go to the end.
« on: January 29, 2019, 04:44:49 PM »
Ok.  That works great! 
I didn't know you could run another function like that inside a macro.  That's awesome!!

314
Mach4 General Discussion / Re: Stop a macro and go to the end.
« on: January 29, 2019, 10:37:03 AM »
I couldn't get the m6.errorOut() to work.  Does that go in the Macro as well or does that go in the screen load script?  I tried both, putting it in the screen load script gave me a Script Error and putting it in the macro did nothing.  It didn't read the Function at all.

However, the "return" is exactly what I was looking for; that works perfect.  I would still like to know more about this other function though.

315
Mach4 General Discussion / Stop a macro and go to the end.
« on: January 29, 2019, 09:28:02 AM »
I'm setting up my tool changer and I want to stop the macro if one of the SignalWait calls comes back with an error.  I want to move from that point to the end where I have an error message; this works when I debug, but it reads through the rest of the macro, turning on and off my cylinders for the tool change.
I tried mc.mcCntlMacroStop and mc.mcCntlMacroAlarm.  Those don't stop Outputs from coming on, I just tested this; this is not good.  I have it stop because one of the cylinders messed up, I don't want the arm to get out of sync with the remaining cylinders coming on after one is stuck.
So, I'm just looking for a way to stop the Macro either dead in it's tracks with an alarm message or not (I already have a message for the error), or jump to a specified point in the bottom of my macro.

316
smav,
There aren't any more functions from a drop down other than jogging from the Keyboard Plugin Config.  You will have to add your inputs to the Signal Library just like you did with the E Stop.
The EStop was easy because there is already a call for E Stop; but you will have to write a script to do other functions like increasing Jog %.

I made a script to increase and decrease the Spindle Override with the (+) and (-) buttons.
I mapped the Buttons to Input 3 and Input 4.
In the screen load script; I made a function called SpindlePlus() to increase by 10% and SpindleMinus() to decrease by 10%
In the Signal Library, I put those functions in Input 3 and Input 4 respectively.



[mc.ISIG_INPUT3] = function (State)
    if (State == 1) then   
       SpindlePlus()
     end
end,

[mc.ISIG_INPUT4] = function (State)
    if (State == 1) then   
       SpindleMinus()
     end
end,

---------------------------------------------------------------
function SpindlePlus()
    local inst = mc.mcGetInstance()
    local SSO = mc.mcSpindleGetOverride(inst)--Returns:  0.5 - 1.5
    if SSO >= 1.5 then
       mc.mcCntlSetLastError(inst, "Can't increase SSO anymore.")
    else
       SSO = (SSO + 0.1)
       mc.mcSpindleSetOverride(inst, (SSO))
    end
end
---------------------------------------------------------------
function SpindleMinus()
    local inst = mc.mcGetInstance()
    local SSO = mc.mcSpindleGetOverride(inst)--Returns:  0.5 - 1.5
    if SSO <= 0.5 then
       mc.mcCntlSetLastError(inst, "Can't decrease SSO anymore.")
    else
       SSO = (SSO - 0.1)
       mc.mcSpindleSetOverride(inst, (SSO))
    end
end
---------------------------------------------------------------


317
Mach4 General Discussion / Re: Anyone use mach4 recently; version 2?
« on: January 29, 2019, 08:26:11 AM »
We've been using Mach4 on multiple machines (9 working on #10) for almost two years.  Like Craig mentioned, it is MUCH much better than Mach3.

318
Mach4 General Discussion / Re: Keep track of OB axis
« on: January 28, 2019, 10:49:40 PM »
I would like to make a rollover axis as well.  Once my carousel gets to 20 I want it to go back to 0.
I really don't know where to start with this myself.
I will look at it more tomorrow, but the examples in the manual aren't very clear to me.

319
Mach4 General Discussion / Re: A Aixs Brake
« on: January 28, 2019, 06:24:26 PM »
It sounds like you want communication from the drive to Mach.   You will need some sort of output from the motor drive to do that

320
HAHA Craig,
I was posting this exact reply, then it wouldn't post because a new post had been made.  Nice!
Great Explanation of the differences as well!!