Hello Guest it is March 28, 2024, 05:48:39 AM

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

0 Members and 1 Guest are viewing this topic.

Re: hold all axis also on jog
« Reply #10 on: April 01, 2019, 07:13:20 PM »
i dont like this way because its look to complex for this base comand(do not forget
i need to remember the curent speed ,then put them again while condition pass ,so its become much complex ,and
as i mention its not only before homing its also in some other cases
so then i got what mach warning against ,try avoid heavy on plc script
but also other much more problem for me its that the jog command as i copy from yours sample not turn to "0"
in my laptop
Re: hold all axis also on jog
« Reply #11 on: April 01, 2019, 07:24:19 PM »
thanks
can you please explain  about that command
mcCntlMacroAlarm(in document its that said its force in alarm state ,but its actually do?)
and what is parameter 5000-5006

Offline smurph

*
  • *
  •  1,544 1,544
  • "That there... that's an RV."
    • View Profile
Re: hold all axis also on jog
« Reply #12 on: April 01, 2019, 07:32:17 PM »
It does just that.  Forces an alarm state.  An alarm will stop the machine if it is running a G code file.  And it requires a Reset to clear the alarm condition.  It also raises the OSIG_ALARM signal (that could be used to drive a flashing light, for example).  The number is arbitrary.  I used 5000 and walked it up so that if something happens, you could tell where in the script by matching the alarm number.  The the alarm number and text is put in the status history. 

Steve
Re: hold all axis also on jog
« Reply #13 on: April 01, 2019, 07:37:04 PM »
Hi Smurph,
very smooth.

I take it that raising ISIG_MOTION_INHIBIT causes the core to stop producing movement?

Craig
« Last Edit: April 01, 2019, 07:40:48 PM by joeaverage »
'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 #14 on: April 01, 2019, 07:44:19 PM »
Yes.  ISIG_MOTION_INHIBIT can also be use with safety devices like a light curtain to stop the machine if the operator crosses the boundary. 

It is one of the three following inhibit signals. 

Motion Inhibit  ISIG_MOTION_INHIBIT
Jog Inhibit  ISIG_JOG_INHIBIT
MPG Inhibit  ISIG_MPG_INHIBIT

Motion is ALL motion.  But Jog and MPG can be inhibited separately. 

Steve
Re: hold all axis also on jog
« Reply #15 on: April 01, 2019, 07:46:14 PM »
Hi,
kool, I don't recall seeing them before. I can't find them in the API.chm input signal listing?

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 #16 on: April 01, 2019, 07:50:33 PM »
BTW,

mc.mcCntlMacroAlarm(inst, 5005, 'Could not set ISIG_MOTION_INHIBIT signal state to 1!')

is the same as the following G code line:

#3000 = 5005 (Could not set ISIG_MOTION_INHIBIT signal state to 1!)

There is also mcCntlMacroStop() which will just stop a cycle but it does NOT raise an alarm (or OSIG_ALARM) and thus does not need a reset to clear it.  Is it the same as the following G code line:

#3001 = 1001 (This is a macro stop!)

Steve
Re: hold all axis also on jog
« Reply #17 on: April 01, 2019, 07:51:11 PM »
i do not want stop the gcode
its not alarm state
its just safty state
for example in this machine i have labeling system that apply label on parts
when the label cylinder is down i must hold any axis movement ,in any condition
no G0 no G1 no joging
but sure not stop the gcode
also in other machine i have safety ray protect  device
if you got into that area movement must hold at any case also
thanks

Offline smurph

*
  • *
  •  1,544 1,544
  • "That there... that's an RV."
    • View Profile
Re: hold all axis also on jog
« Reply #18 on: April 01, 2019, 07:58:18 PM »
Read the code again.  Those alarm conditions are only there if an API return code indicates failure.  In the case of an API failure, you probably WANT to stop the machine.  All of those tests are there to make the code bullet proof and safe, as all production machine should be.  In normal operation, the script would just prevent all movement unless the machine has been homed.  Of course, you could change the script to be trigger on any condition.  Say another input that is raised when the label cylinder is down. 

Steve

Offline jbuehn

*
  •  101 101
    • View Profile
Re: hold all axis also on jog
« Reply #19 on: April 01, 2019, 07:59:40 PM »
when checking return codes, is it preferred to use the actual error definition versus the number?