Hello Guest it is April 20, 2024, 12:10:13 AM

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.


Topics - stefangem

Pages: 1
1
Mach4 General Discussion / LUA Problem with Jog Mode
« on: November 24, 2020, 02:55:47 PM »
Hello,

sorry for my english.

i have with arduino over USB and the serialDRO.lua a MPG. All function is ok. BUT i can't switch JOG Modus. INC Modus all ok.

   local JogVel = mc.MC_JOG_TYPE_VEL;
   mc.mcJogSetType(inst, 0, JogVel)
      mc.mcCntlSetLastError(inst, "Jog Cont")

Please can you me help for this Problem???
Code: [Select]
    elseif Command == "1" then
mc.mcJogSetInc(inst, 0, .001)
mc.mcJogSetInc(inst, 1, .001)
mc.mcJogSetInc(inst, 2, .001)
p:write("I 1\n", 5)
mc.mcCntlSetLastError(inst, "Jog Increment 0.001")
    elseif Command == "2" then
mc.mcJogSetInc(inst, 0, .010)
mc.mcJogSetInc(inst, 1, .010)
mc.mcJogSetInc(inst, 2, .010)
p:write("I 2\n", 5)
mc.mcCntlSetLastError(inst, "Jog Increment 0.010")
    elseif Command == "3" then
mc.mcJogSetInc(inst, 0, .100)
mc.mcJogSetInc(inst, 1, .100)
mc.mcJogSetInc(inst, 2, .100)
p:write("I 3\n", 5)
mc.mcCntlSetLastError(inst, "Jog Increment 0.100")
    elseif Command == "4" then
local JogVel = mc.MC_JOG_TYPE_VEL;
mc.mcJogSetType(inst, 0, JogVel)
mc.mcCntlSetLastError(inst, "Jog Cont")

Pages: 1