Hello Guest it is April 26, 2024, 04:29:25 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 - cd_edwards

Pages: « 1 2 3 4 5 6 7 8 9 10 »
51
Mach4 General Discussion / Re: Shuttle Pro Plugin!!!!
« on: July 26, 2015, 03:38:34 PM »
Mine worked with the first version of the plugin that we needed to use the contour drivers for. This new version, doesn't see my device at all. Windows loads the drivers so it appears in my device list, but that's as far as it goes.

52
so much for simple SoftLimitsOn() haha. Thanks for the hard work. I'll rip what I did out of my system and check this out.

53
after thinking about this, I don't think this is a good idea.. We'd need to loop and determine if an axis is enabled, if it is then call this function. Sounds great, until you think about your Z axis with a bit in it. With this function, I would be homing X, then Y/A and finally Z. Moving the X and Y before homing Z doesn't seem like it's in my best interest at all.

54
Mach4 Toolbox / Re: Soft Limits toggle
« on: June 07, 2015, 07:08:30 PM »
Only problem I'm having now is that SoftLimitsToggle() used for the softlimits button will not toggle. Always is on once I've run the RefAllHome.

55
Mach4 Toolbox / Re: Soft Limits toggle
« on: June 07, 2015, 05:53:30 PM »
Thanks poppabear. That's what I was missing. Kept telling me it was a Boolean when I was using the require function.

56
Mach4 Toolbox / Soft Limits toggle
« on: June 07, 2015, 02:49:58 PM »
Add this to the beginning of the Screen loading script. Shamelessly stolen from someone here :)


--////////////////  This is the REQUIRED Header code, Begin  //////////////////////
package.path = "./?.lua;c:/Mach4Hobby/Modules/?.mcc;" --where the module file is.   
ff = require "FuncModule";--load the module file, call it ff
--///////////////  This is the REQUIRED Header code, End   ///////////////////////

create this script in the Modules directory.

function autoSoftLimitsToggle (togglevalue)
    local mInst = 0
    local rc = 0
    local inst = mc.mcGetInstance (mInst)
   -- mc.mcCntlSetLastError(inst, 'In Auto Soft Limits Toggle = ');
    for i=0, 11 do
        if mc.mcAxisIsEnabled (inst,i) == 1 then mc.mcSoftLimitSetState (inst,i,togglevalue) end
    end
end

-- End of funcModule.mcs Don't forget to compile this script Doh!

In your PLC script add the following.

package.path = "./?.lua;c:/Mach4Hobby/Modules/?.mcc;" --where the module file is.   
ce = require "funcModule";--load the module file, call it ce

Near the end of the PLC add the following


if ((machSoftLimits == 1) and (machState == mc.MC_STATE_IDLE)) then
    autoSoftLimitsToggle(1);
    machSoftLimits = 0;
end

if (machSoftLimits == -1) then -- Don't care what the state of Mach4 is here. We just are disabling them.
    autoSoftLimitsToggle(0);
   machSoftLimits = 1;
end


And finally in your Ref All Home button script add the following
machSoftLimits = -1;


This will cause Soft Limits to be turned off while you  are Referencing ALL Home. Once homed, Soft Limits will be re-enabled.

I attempted to run the autoSoftLimitsToggle() directly from the button. This would get rid of the machSoftLimits = -1 crap. no  matter what I tried this failed.


57
--another way--


function autoSoftLimitsOn ()
    local mInst = 0
    local rc = 0
    local inst = mc.mcGetInstance (mInst)

    for i=0, 11 do
        if mc.mcAxisIsEnabled (inst,i) == 1 then mc.mcSoftLimitSetState (inst,i,1) end
    end
end
autoSoftLimitsOn()



I added this to my Ref All home button script.. Not sure if this is an ideal location as the function is completed and soft limits are set before the homing routine is finished. this probably needs to be done in the PLC while the machine is still.

58
Mach4 Toolbox / Re: Spindle WarmUp Wizard
« on: June 02, 2015, 02:47:03 PM »
Slightly corrected version. With the original, I always was starting at 1000rpm. Not quite what we're looking for when our router/spindle's slowest speed is 3000. So I corrected the While loop to start at the requested startRPM and then increment by  the step increment over the time specified. This version goes one increment over the requested max rpm

59
Mach4 Videos / Re: ESS and Mach4 Setup
« on: May 05, 2015, 08:36:14 PM »
I don't think the parallel port is the problem as far as a charge pump is concerned. It's more todo with erratic software and windows crashing. With the signal from the charge pump being put out by mach3/4 the hardware knows its safe to startup the machine. without the signal, then do not startup or for that  matter quit doing what your doing because something catostrophic has occurred such as a software crash or the user exiting the program for some reason.

60
Mach4 Videos / Re: ESS and Mach4 Setup
« on: April 26, 2015, 04:17:57 PM »
thanks for this. I was loosing hair because of that A0 at the end of part 2.. I now have mach4 moving correctly. Still need to figure out sharing of switches as I have X-- and X++ sharing a pin as well as Y and Z. Then there's the spindle. I have it starting up, but there is something definitely wrong. It's surging higher and higher in speed.

Pages: « 1 2 3 4 5 6 7 8 9 10 »