Hello Guest it is March 28, 2024, 05:58:06 AM

Author Topic: hold all axis also on jog  (Read 2857 times)

0 Members and 1 Guest are viewing this topic.

hold all axis also on jog
« on: April 01, 2019, 11:43:12 AM »
hi
i want add simple condition ,that if....
not any movement can happened
not on reference
not on G0
not on G1
and not on manual move
very very simple request but cant find hoe do it
Re: hold all axis also on jog
« Reply #1 on: April 01, 2019, 03:46:04 PM »
Hi,
how about having a test in the PLC script that if the machine is not Homed then the
feed rate override, the raid rate override and jog seed are all set to zero?

Code: [Select]
local inst=mc.mcGetInstance()
local homedX=mc.mcAxisIsHomed(inst,mc.X_AXIS)
local homedY=mc.mcAxisIsHomed(inst,mc.Y_AXIS)
local homedZ=mc.mcAxisIsHomed(inst,mc.Z_AXIS)
local homed= homedX and homedY and homedZ
if (homed ==0)then
mc.mcCntlSetFRO(inst,0.0)
mc.mcCntlSetRRO(inst,0.0)
mc.mcJogSetRate(inst,mc.X_AXIS,0.0)
mc.mcJogSetRate(inst,mc.Y_AXIS,0.0)
mc.mcJogSetRate(inst,mc.Z_AXIS,0.0)
end

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: hold all axis also on jog
« Reply #2 on: April 01, 2019, 06:08:46 PM »
hi
thanks for fast answer
i already tried it
but in the Jog its not give 0 its give 20% even we put 0
Re: hold all axis also on jog
« Reply #3 on: April 01, 2019, 06:12:18 PM »
Hi,

Quote
but in the Jog its not give 0 its give 20% even we put 0

It works fine on my machine.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: hold all axis also on jog
« Reply #4 on: April 01, 2019, 06:21:59 PM »
now in my laptop its 29% while in the machine it was 20%  strange
Re: hold all axis also on jog
« Reply #5 on: April 01, 2019, 06:26:10 PM »
second reason im not sure i can use it  ,is that i use external potenziometr to control both G0 G1
i think there will be conflict between that 2 commands
there must be much more easy way to hold all axis ,its basic safety command not only when no homing ,but also in some
mechanic sondition
Re: hold all axis also on jog
« Reply #6 on: April 01, 2019, 06:49:45 PM »
Hi,

Quote
is that i use external potenziometr to control both G0 G1
i think there will be conflict between that 2 commands

I suspect that is the case, the rate overrides are looking to the potentiometer, even if you set them at zero
the potentiometer resets it to some minimum value almost immediately.

You can disable each axis with:

Code: [Select]
LUA Syntax:
rc = mc.mcAxisEnable(
                     number mInst,
                     number axisId,
                     number enabled);

Description:
Enable or disable the specified axis.

Parameters: Parameter Description
mInst The controller instance.
axisId The axis ID.
enabled Send true to enable or false to disable axis.


However I suspect that this would also prevent you from homing your machine, in fact I thin this would permanently
disable your machine. I'm reluctant to suggest you try it.

If your machine is not homed......then disable all axes
try to home your machine......can't home because axes are disabled
try to enable axes.......works for a little bit but THEN
if your machine is not homed......then disable all axes

IE you have created a loop which disables your axes continuously, not recommended.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: hold all axis also on jog
« Reply #7 on: April 01, 2019, 06:54:40 PM »
when i disable the axis i think i will get the output enable "0" then servo driver will turn too "bb" insted of "run"
this very bad
as i mention its not condition only  before homing
its command to "hold" in some other cases
for example while force one of the cylinder that can accident
Re: hold all axis also on jog
« Reply #8 on: April 01, 2019, 07:06:33 PM »
Hi,

Quote
when i disable the axis i think i will get the output enable "0" then servo driver will turn too "bb" insted of "run"
this very bad

Exactly.....this is why I suggested that you reduce the Rapid Rate Override, the Feed Rate Override and the axis Jog Rates
all to zero, it means that the servos are all still enabled but Gcode, MDI and Jogging causes no motion, or at least they do
cause motion but at zero speed. This still allows the servos to respond to movement instructions from the core to
home the machine.

If you don't like that idea or it wont work with your installation because of other stuff you have hooked up
then you will have to devise some other way.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'

Offline smurph

*
  • *
  •  1,544 1,544
  • "That there... that's an RV."
    • View Profile
Re: hold all axis also on jog
« Reply #9 on: April 01, 2019, 07:10:59 PM »
Use the motion inhibit input signal.  ISIG_MOTION_INHIBIT

In the Screen load script:
Code: [Select]
function Checkhomed()
local inst = mc.mcGetInstance('CheckHomed')
local homedX, homedY, homedZ, homed, rc, hSig, inhibit
homedX, rc = mc.mcAxisIsHomed(inst, mc.X_AXIS)
if (rc ~= mc.MERROR_NOERROR) then -- check retun codes!
mc.mcCntlMacroAlarm(inst, 5000, 'Could not retrieve X axis homed condition!')
return
end
homedY, rc = mc.mcAxisIsHomed(inst, mc.Y_AXIS)
if (rc ~= mc.MERROR_NOERROR) then -- check retun codes!
mc.mcCntlMacroAlarm(inst, 5001, 'Could not retrieve Y axis homed condition!')
return
end
homedZ, rc = mc.mcAxisIsHomed(inst, mc.Z_AXIS)
if (rc ~= mc.MERROR_NOERROR) then -- check retun codes!
mc.mcCntlMacroAlarm(inst, 5002, 'Could not retrieve Z axis homed condition!')
return
end

hSig, rc = mc.mcSignalGetHandle(mc.ISIG_MOTION_INHIBIT)
if (rc ~= mc.MERROR_NOERROR) then -- check retun codes!
mc.mcCntlMacroAlarm(inst, 5003, 'Could not retrieve ISIG_MOTION_INHIBIT signal handle!')
return
end
inhibit, rc = mc.mcSignalGetState(hSig)
if (rc ~= mc.MERROR_NOERROR) then -- check retun codes!
mc.mcCntlMacroAlarm(inst, 5004, 'Could not retrieve ISIG_MOTION_INHIBIT signal state!')
return
end

homed = homedX and homedY and homedZ
   
if ((homed == 0) and (inhibit == 0)) then
rc = mc.mcSignalSetState(hSig, 1) -- raise the mc.ISIG_MOTION_INHIBIT signal
if (rc ~= mc.MERROR_NOERROR) then -- check retun codes!
mc.mcCntlMacroAlarm(inst, 5005, 'Could not set ISIG_MOTION_INHIBIT signal state to 1!')
return
end
elseif ((homed == 1) and (inhibit == 1)) then
rc = mc.mcSignalSetState(hSig, 0) -- raise the mc.ISIG_MOTION_INHIBIT signal
if (rc ~= mc.MERROR_NOERROR) then -- check retun codes!
mc.mcCntlMacroAlarm(inst, 5006, 'Could not set ISIG_MOTION_INHIBIT signal state to 0!')
return
end
end
end

Then call Checkhomed() from the PLC script
Steve