Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: bill_burgess on December 26, 2007, 01:47:16 PM

Title: Estop at wrong times web cam how do i ? help
Post by: bill_burgess on December 26, 2007, 01:47:16 PM
Hi  All Been a while since  i  have  been back  here 
its  xmass  what  beter   time  to  play  with  my  toy  and  create  myself  more  problems
any  help  or  pointers  to  posts  that  may  help  apreaciated

ok  i  upgraded to  day  to  ver  R2.62   checked  opration  all  seems  good

ok  i have  my  system  set  up  with  soft  limits   this  works  very  good  but  i  have  to  remeber  to  switch  off befor doing a  ref all
if  i  do  not  then  it  seems  to  ref  the  z axis   ok but  when  it  hits  the  limit  switch on  the y axis  it  trips the  estop  with  the  warning
limits .  I  have  to  switch  of  limits  then  ref  then move all the axis away from  the  limit switches  then  switch  on soft limits again.
this  was also happing on  the old  version  that i was using .  is  there a way  that  i  can  change the code  behind  the  ref all button to  do  the above  automaticly  ie  switch  of  soft limits  ref all drives then move drives to  a set  position  then  switch  soft limits  on  again .
or  is  somthing  not  right  on  my  system .

I also  find a  problem  when i  call  for  NFS wizards  to  load  this also  caused my  system  to  trip  the  estop  i  can  only  think  that  the reset  is  not  sent  to  the  cambell board that  i  am  using  and  the watchdog times  out and  trips  the system  while  these are  loading
any  one  had  this  problem  befor .

Now  the  good  news  i  have  set  up  my  webcam  and  seem  to  have  this  working ok  but  cant  find  any  instructions  on  using  it
my intention  was  to  have  it  set  with an  offset   x+50 y-50   this  i  have  done I  can  now use  the camra to   center  on  say  a 6mm hole  then  type  the offset value into the dro for x and  y  this  then allowes  me  to  put  the  cutter back into  the  hole at x=0 y=0
I  was  looking   for a  button that  would  let  me  do  this automaticly   or  have  i  missed  somthing  here

anyway  thanks  for  reading  this   and  any  help you  can  give   

Bill
Title: Re: Estop at wrong times web cam how do i ? help
Post by: Hood on December 26, 2007, 02:57:21 PM
You should NOT have to turn off softlimits to reference, you have something amiss. Can you post your xml to see if there is a seeting wrong. Could be noise on your limits though, so maybe try the debounce up to 2000 and see if that helps, if it does then lower it step by step until you hit the problem again.
Hood
Title: Re: Estop at wrong times web cam how do i ? help
Post by: Chaoticone on December 26, 2007, 08:44:31 PM
Hmmmmmmmmm, will have to check mine. I think I have to turn off soft limits to Ref as well.

Brett
Title: Re: Estop at wrong times web cam how do i ? help
Post by: jimpinder on December 27, 2007, 06:17:53 AM
I am having much the same problem with mine -  I set x home, and it homes correctly, but as it backs off the limit/home switch it triggers the e-stop - I have to reset the e-stop before setting z home.(which then does the same thing)  I will try the debounce solution as suggested.

Brett - yes - I had Skype, (to talk with my son in Iraq) but then wiped it off after he came home. I will download it again and get in touch.

Back to this thread though - how did you go on downloading your web-cam - did windows automaticall install it, and then did it run first time with Mach 3 ???  Did you have to adjust any settings or drivers ???
Title: Re: Estop at wrong times web cam how do i ? help
Post by: Chaoticone on December 27, 2007, 07:33:11 AM
Hey Jim,
    THe webcam, optical edge finder I got from member zarzul came with a cd that had the drivers and other software. Before ever pluging the camera in, I installed only the drivers. Once that was finished, I pluged it in, opened Mach, video window and it all worked great. I will play with it a little today. I don't remember having to adjust any settings or drivers.

Brett
Title: Re: Estop at wrong times web cam how do i ? help
Post by: bill_burgess on December 27, 2007, 01:03:05 PM
Hi  My  webcam  worked  first  time    i  loaded  it  with  its  normal  drivers into  windows   once  that  was  working  started  mach  3 and  it works  fine     only  thing  that does  nor  work  is  the  button  to  start / set   webcam  this  reports  that  it  can  not  start  webcam  but  it  is  allready  working    just  about  to  go  get  my  xml  file   and  chak  again  what  happens 

bill
Title: Re: Estop at wrong times web cam how do i ? help
Post by: bill_burgess on December 27, 2007, 06:17:24 PM
Hi Guys 
well  i  had  a  look  again  tonight  at  my  system  still could  not  find  why  if  will  not  reff unless i  take  of  the  soft  limits     so  in  the  end  i  added  this  code to  both  reff all  buttons   

If getOEMled(23) Then DoButton(29)
DoButton( 24 )
DoButton( 23 )
DoButton( 22 )
DoButton( 25 )

code "g0 x5y5z-2"

While Ismoving()
Wend

Dobutton(29)

this  now  seems  to  have  solved  the  problem  for  now  anyway 
still  having  the  estop problem  when  loading  nF wizards  though 

sorry  could  not  find  where  the  ini file  was 

bill
Title: Re: Estop at wrong times web cam how do i ? help
Post by: Hood on December 27, 2007, 06:22:07 PM
Bill just out of interest what do you have the softlimits set to?
Hood
Title: Re: Estop at wrong times web cam how do i ? help
Post by: jimpinder on December 28, 2007, 10:34:54 AM
Bill - sorry to jump into the post -

Brett - yes, got that, I might try and get hold of Zarzul and get him to e-mail the drivers

Thanks.
Title: Re: Estop at wrong times web cam how do i ? help
Post by: bill_burgess on December 28, 2007, 07:58:11 PM
ok  i  found  the  mistake  in  my  code   got  it  working  to  night  to  ref  the axis  then  found  that  when  i  wanted  to  move  if  5 mm in on  x  and  y   it  ended  up  in  midel  of  table   .....
then  realised  i  wanted  to  call the  move  in  machen  coordinat  system  so  changed  the  code by  adding  g53   and  g54  as below     need  to look  and  see if  i  can  just  comand  in  abs  mode
or  check  if  i  am  using  g54  or  some  other  offset  copy  it   and  then  put  it  back  into  that  mode  after  i ref  but  for  now  will leave  as  g54 

bill

If getOEMled(23) Then DoButton(29)
DoButton( 24 )
DoButton( 23 )
DoButton( 22 )
DoButton( 25 )

code "G53 g0 x5y5z-2"
code "g54"

While Ismoving()
Wend

Dobutton(29)
Title: Re: Estop at wrong times web cam how do i ? help
Post by: Hood on December 29, 2007, 03:18:56 AM
Bill I think it would be better for you to get the soflimits working as they should, you should not have to add code to your Ref button to achieve it.
Hood
Title: Re: Estop at wrong times web cam how do i ? help
Post by: Chaoticone on December 29, 2007, 06:27:09 AM
Guys, listen to Hood on this one. He'll get you straight. He gave me a lesson on this a couple days ago. Can't mess with the Hoodster.  ;D

Brett
Title: Re: Estop at wrong times web cam how do i ? help
Post by: jimpinder on December 30, 2007, 10:38:13 AM
Surely the only way to get the referencing working is to set the soft limits outside the co-ordinates needed by the home switches. I use micro switches, and when these are hit, they travel quite a distance (relatively) before they stop. I can't remember by how far but it might be 0.0500. The axis then backs off until the switche closes and then the DRO goes to zero.

It follows therefore that my softlimits must be at least 0.0500 below zero, or the soft limit will trigger.

Coupled with that, of course is the fact that my z axis - the main lathe axis, can be de-coupled manually, moved to a short distance from the switch, the re-coupled and the axis told to home ( this saves time becasue the traverse time is so long).  This shouldn't actually make much difference, because the relative DRO position should always be several inches above zero in a +_ve direction.

The problem is, of course that, in setting software limits, if you set them too high - they will trigger an E stop. If you set them too low, (on my system ) they will bend the metal actuator on the micro-switch.
Title: Re: Estop at wrong times web cam how do i ? help
Post by: bill_burgess on December 30, 2007, 11:42:35 AM
Hi  all  Ok  Today  remberd  to  take a note  of  my  soft  limit  settings  and  take usb  memory  to  copy  files 

X axis   reversed  No  soft  max 586  soft  min 1   slow zone  15  home  off 0000  home  neg  yes auto zero yes speed 20%

Y axis   reversed  Yes  soft  max 459  soft  min 1   slow zone  15  home  off 0000  home  neg  yes auto zero yes speed 20%

X axis   reversed  Yes  soft  max 0  soft  min -35  slow zone  1 home  off 0000  home  neg  NO  auto zero yes speed 20z

ok  also  found  Xml  document    whitch  i  have attached 

hope  this will shed  some  light  on  the  problem 

regards  Bill






 
Title: Re: Estop at wrong times web cam how do i ? help
Post by: Hood on December 30, 2007, 01:55:39 PM
Bill set your min for X and Y to 0.
 You have it set to 1 so every time your axis moves below 1 (in machine coords) you hit the softlimit.
 Remember that the zero that Mach sets, as its machine coordinate, is after the switch has closed, thus setting a 0 for your softlimit min should never activate the physical switch. You can test this out by doing a rapid move towards your min limit, if Mach cant slow quick enough you need to set up a bigger slow zone, how much depends on lots of factors, motor tuning being a major one.
Hood
Title: Re: Estop at wrong times web cam how do i ? help
Post by: Hood on December 30, 2007, 03:01:33 PM
Jim
 I am having trouble visualising exactly what you are meaning, so if the following doesnt bare a resemblance to what you mean please ignore.
 If your home switch is hit and it takes a while before the axis stops and reverses that is neither here nor there for Mach as Mach does not set the Zero (machine Coordinate) until the axis has reversed and the switch has closed again. Therefore if you set the min for that axis as 0 it should never get as far as activating your limit switch because the zero position is when the switch closed. As I said to Bill above if you rapid to the limit and the soft limits dont kick in in time then you need to set your slow zone larger so that Mach can decellerate your axis and not overtravel the soft limit.

As for your Z axis, I dont think there is any way that you could possibly set up softlimits as your limits can be moved. Obviously you could set up softlimits for min and max but every time you reposition the Home switch (or trigger for it) you would have to set up new softlimits.

Just out of curiosity, do you have your X axis set up so that the zero position is spindle centre, this is the normal way to do it on a lathe, that way every time you command an X move it will cut that diameter, eg if you are using Dia mode and you tell the X Axis to be at X40 you will cut 40mm Dia. This may not be of much use to you depending on your setup, ie if you have tool turrets/posts with fixed tools then you set it this way, if you have a Quick change Toolpost with all your tools in holders then it would also be an advantage to work this way. However if you have a conventional toolpost and are changing tools in and out all the time then it is probably of no advantage for you to have your axis set to zero at spindle centre.

 

Hood
Title: Re: Estop at wrong times web cam how do i ? help
Post by: bill_burgess on December 31, 2007, 11:20:57 AM
Hi  Hood 
thanks  for  that   reset  to  zero  and  now  works    i have had   a  play  with  this  and  find  the following 
when  you  call a  ref  the system  ingnores  the soft limit  seting  and  will drive  the axis back on  to  the  limit  switch  this  may  take  you  through the soft limit  value in my  case   1  so  may  drive  to  somthing  like -50  this  is  ok  because  the system  in  a ref call ingnors  the soft limit seting   once the axis is refranced  and  that  routeen  ends  then soft limits  become active  again 
as  my  system was  set  to  auto  zero  the  MC   dro   this now shows 0 my  soft  limit  set  for  1 the system  would  see this as a  fault  and  trip the estop .

yes  can see  where  this  is  going  wrong  now      if  you  do  not  auto  zero  the  dro  then  the  system  may  trip  even  if limit is set  to 
0  as  it  would  leave  the  -50  value 

Ok  it  could  be  that  i  am  expecting  too much from  the system   i  was expecting  the soft  limit  settings  to  allow me  to  define a work  area on  the table  that once  refranced  the  tool  would  not    move  out  of 
I  now  see  that  to  do  this  would  need  the  reff  call to  set  the  system on  the  limit  switch  back  it  off unitil the switch  closed again  set the MC dro  to  zero and  then  move  the axis  to  the min soft limit value befor finishing  so  the system  would  not  trip
it  would  need  to  this  on  all axis .

Ok  something  to  think  about 

thanks  bill





Title: Re: Estop at wrong times web cam how do i ? help
Post by: Hood on December 31, 2007, 11:56:17 AM
Bill,

 The softlimits are there so that the axis will stop in a controlled manner rather than triggering a physical  limit and thus needing to re-reference the axis. Your softlimits if set correctly will give you the max available travel of your axis and will prevent you from moving further and triggering a physical limit switch, so in effect gives you a safe working envelope of your full axis travel..
The numbers in your softlimits are in Machine Coordinates, I think you may be getting confused with the work coordinate usually showing in your DROs. What I mean is once referenced you could move positive by 100mm on the X and then  zero the axis, it would now show up as 0. If you now  moved back towards your limit by 99mm it would show as -99 in the DRO. However if you toggle the Machine Coords button you will now see that the DRO reads 1 and so is still above the 0 setting in your softlimits. If you tried to move to -101 Mach would stop you as you would be going outwith the softlimits.

I am not the best at explaining so I hope this makes things clearer.

Hood
Title: Re: Estop at wrong times web cam how do i ? help
Post by: bill_burgess on December 31, 2007, 12:54:55 PM
Hi  Hood 
 yes  i  realise  we  are  talking Machine Coordinates, 
as  i  say  having  now  realised  that  the system  when  finished  reff  on  an  axis   that  the  soft  limits  become active again  then  it  is  obvious  that  it  has  to  be  a  0  as  this  is  what  we  are setting  the Machine Coordinates, to  once  referenced with  the  auto  zero function

mind  you  a  good  lesson  in  editing  code  to  make  it  do  what  you  want  .

now  i  just  have  to  find  out  why   the  estop  trips  when  i  load  wizards  and  when  they  save  g code  back  to mach 3
i  did  think  it  was  just  the  nfg wizards  but  now  found  that  all do  the  same 

think  i  need  to  look  at the  watchdog  signal  sent  to  the  break out  board see  if  that  stops  when  saving  the  data

thanks  for  you  help   bill