Hello Guest it is October 04, 2023, 10:04:32 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 - rhtuttle

51
PoKeys / pokeys57cnc and mc60 motor controller
« on: May 12, 2021, 12:10:27 PM »
Has anyone used the above combination? I had a pmdx411, gecko g540 and mc60 working on my lathe.  Needed more outputs and switched to Pokey57CNC.  The g540 had 3 wires to the mc60, the +10v, common and 0-10v to regulate the spindle speed.
I am electrically illiterate and cannot figure out how to wire the pokeys board to the same mc60 speed controller.  I have the white connected to pokeys 0-10v output but don't know where the black and red wires should be connected.  Any guidance would be greatly appreciated.

TIA
RT

52
Mach4 Toolbox / Re: Getting tool info into tool table
« on: May 07, 2021, 05:55:26 PM »
The mc.SV_? correspond to the variables passed to the macro.
example: m6061 z1.3333 d.250
mc.SV_Z would contain 1.3333 and mc.SV_D would contain 0.250.  Any labled character can contain a value and can be accessed within a macro by mc.SV_
Start with reading the scripting Manual.pdf in the docs directory and then examine the lua examples in the LuaExamples directory.
HTH

RT

53
Mach4 Toolbox / Re: Getting tool info into tool table
« on: May 07, 2021, 11:35:22 AM »
Maybe this will help get you started:

Code: [Select]
--[[
Macro to set Z or X offset or tool description
example: m6061 z1.3333 d.250
--]]

function m6061(hParam)
if (hParam ~= nil) then
--mc.mcCntlSetLastError(inst, 'handle == ' .. tostring(hParam));
local inst = mc.mcGetInstance();
local zVal = mc.mcCntlGetLocalVar(inst, hParam, mc.SV_Z)
local zFlag = mc.mcCntlGetLocalVarFlag(inst, hParam, mc.SV_Z)
local xVal = mc.mcCntlGetLocalVar(inst, hParam, mc.SV_X)
local xFlag = mc.mcCntlGetLocalVarFlag(inst, hParam, mc.SV_X)
local dVal = mc.mcCntlGetLocalVar(inst, hParam, mc.SV_D)
local dFlag = mc.mcCntlGetLocalVarFlag(inst, hParam, mc.SV_D)
if(zFlag == 1)or(xFlag==1)or(dFlag==1) then
if zFlag==1 then
    rc=mc.mcToolSetData(inst,mc.MTOOL_LATHE_Z,61,tonumber(zVal))
end
if xFlag==1 then
    rc=mc.mcToolSetData(inst,mc.MTOOL_LATHE_X,61,tonumber(xVal))
end
if dFlag==1 then
    rc=mc.mcToolSetDesc(inst,61,'Bit Diameter: '..tostring(dVal))
end
else if zFlag==1 then
    mc.mcCntlSetLastError(inst, 'ERROR: Z, X or D value required with M6061');
    mc.mcCntlEStop(inst);
end
end
else
mc.mcCntlSetLastError(inst, 'ERROR: handle == nil');
end
end

if (mc.mcInEditor() == 1) then
    m6061()
e

54
Mach4 General Discussion / Re: X Box here we come!
« on: April 20, 2021, 04:56:59 PM »
Anyone working on this?  Super useful when it works!

55
Mach4 General Discussion / Re: SSR m7 serial
« on: April 13, 2021, 07:40:46 PM »
That's the route I took along with 2 teknic clearpath motors and cables and power supply.
Now I just need some recommendations on the logic level limits!

56
Mach4 General Discussion / Re: SSR m7 serial
« on: April 13, 2021, 04:06:25 PM »
You guys just cost me a lot of money! ;)

RT

57
Mach4 General Discussion / Re: SSR m7 serial
« on: April 13, 2021, 11:26:30 AM »
Craig, you have been a great resource here over the last few years and have given great advice and insight which is much appreciated.  However, I am an electronically challenged individual.  I've tried to glean something from the internet regarding PLC modules but l am befuddled by their usage of wattage, amps, volts...

I don't know how to evaluate the options.  Would this work: https://www.amazon.com/MODBUS-Multi-Function-Ultra-Small-Controller-Channel/dp/B08238RBNH/ref=sr_1_4?dchild=1&keywords=plc+controller+12v&qid=1618326075&sr=8-4  If not could you supply a link to what I should be considering?

If money and time were no object I would buy a new bob and ess and power supply, or, buy another PoKeys57CNC since I have one of those on my mill and have successfully hooked in a mist system on that.


59
Mach4 General Discussion / Re: macro lathe toolchange
« on: April 12, 2021, 03:01:06 PM »
C:\Mach4Hobby\LuaExamples\Toolchanger

60
Mach4 General Discussion / SSR m7 serial
« on: April 12, 2021, 02:10:51 PM »
Would appreciate any help on the following.
I am running M4 with a pmdx-411 and g540.
I am out of outputs available with this setup.
For a mist system I have a 3vdc - 12vdc SSR
What is the easiest way to control that switch?
It seems that I should be able to control it through a serial cable.

TIA

RT