241
Mach4 General Discussion / Re: X Box here we come!
« on: February 06, 2021, 03:36:56 AM »
I think he meant to say 4609.
Steve
Steve
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.
function JogStart(mInst, axis, dir)
local type = 0
type, rc = mc.mcJogGetType(mInst, axis)
if (rc == mc.MERROR_NOERROR) then
if (type == mc.MC_JOG_TYPE_VEL) then -- velocity
mc.mcJogVelocityStart(mInst, axis, dir)
else -- incremental
local inc = 0
inc, rc = mc.mcJogGetInc(mInst, axis)
if (rc == mc.MERROR_NOERROR) then
inc = inc * dir
mc.mcJogIncStart(mInst, axis, inc)
end
end
end
end
function JogStop(mInst, axis)
local type = 0
type, rc = mc.mcJogGetType(mInst, axis)
if (rc == mc.MERROR_NOERROR) then
if (type == mc.MC_JOG_TYPE_VEL) then -- velocity
mc.mcJogVelocityStop(mInst, axis)
end
end
end
The Mach 4 MODBUS plugin just maps I/O or registers to the device. That is basically ALL it does. There really isn't any MODBUS "programming" as in some special MODBUS script. The MODBUS plugin just maps Mach resources (registers and I/O) to the device. Then you can use any LUA scripting as you would with any other Mach resources from any other plugin.