Hello Guest it is April 25, 2024, 02:09:47 PM

Author Topic: execute a function with "input 1"  (Read 9673 times)

0 Members and 1 Guest are viewing this topic.

Re: execute a function with "input 1"
« Reply #10 on: January 12, 2012, 05:36:51 PM »
ok
 so I can put what, remember the Z value at that time
« Last Edit: January 12, 2012, 05:42:34 PM by ch_porchet »
Re: execute a function with "input 1"
« Reply #11 on: January 13, 2012, 07:35:32 AM »
CH, I guess I have no idea of what you are trying to do. Can you tell us in detail what you want the machine to do it you could use G31? This is probably as clear as mud also.

Tony

Offline stirling

*
  • *
  •  2,188 2,188
  • UK
    • View Profile
    • www.razordance.co.uk
Re: execute a function with "input 1"
« Reply #12 on: January 13, 2012, 08:21:18 AM »
Tony, I think the issue here is that the OP's usb motion card doesn't support G31 which is sadly not a unique situation. Why hardware is released that doesn't fully function is a mystery to me but that's another topic I guess.

Anyway, I think the name of the game here is to try to "reproduce" G31's functionality via some other means - macro - gcode whatever. However, it's not something I think is really achievable. A lot depends on the accuracy of the "trip point" that the OP requires. You can get a "close-ish" approximation quite easilly with either a macro or gcode but it's not elegant and I very much doubt it's possible to get the "step perfect" trip point like a "proper" G31 does.

We've had many similar posts to this - I remember one quite recently involving Ajax cards inability to do G31 where the poster was trying to do exactly the same thing. He was advised to approach the hardware vendor and get it fixed - just like I've advised here.

Ian
Re: execute a function with "input 1"
« Reply #13 on: January 13, 2012, 09:39:35 AM »
Thanks Ian, I guess I can't help.

Tony
Re: execute a function with "input 1"
« Reply #14 on: January 13, 2012, 10:20:51 AM »
hello
 I know it's not practical, but I is not the choice
 do you think it is possible to do that (input1) silk a maximum limit of Z
Re: execute a function with "input 1"
« Reply #15 on: January 14, 2012, 03:46:10 AM »
So the question is
  Is it possible to stop the Z-axis moving with "input1"
because "input1" maximum limit as Z is not terrible
« Last Edit: January 14, 2012, 03:48:06 AM by ch_porchet »

Offline stirling

*
  • *
  •  2,188 2,188
  • UK
    • View Profile
    • www.razordance.co.uk
Re: execute a function with "input 1"
« Reply #16 on: January 14, 2012, 05:32:48 AM »
does your system support G28.1?
Re: execute a function with "input 1"
« Reply #17 on: January 14, 2012, 07:18:52 AM »
I think so, because the G31 is a matter of usb driver, while it's Gcode

Offline stirling

*
  • *
  •  2,188 2,188
  • UK
    • View Profile
    • www.razordance.co.uk
Re: execute a function with "input 1"
« Reply #18 on: January 14, 2012, 07:53:36 AM »
Well both G31 and G28.1 are usually IMPLEMENTED in the driver or external card but anyway read up on G28.1 - I think it will do what you want.
Re: execute a function with "input 1"
« Reply #19 on: January 26, 2012, 02:08:48 AM »
hello
 I arrived with this macro
Sorry I put the legend in french

'Lancement de la commande de probe rapide vers le bas
SetOEMDRO(1000, 2) ' Numéro de l'axe ou faire le probe (0=X, 1=Y, 2=Z)
SetOEMDRO(1001, -90) ' Course maxi (le signe indique le sens de déplacement)
SetOEMDRO(1002, 20) ' Feed rate
SetOEMDRO(1003, 9) ' Numéro de l'entré de plapage (1 à 16
SetOEMDRO(1004, 1) ' état de l'entrée attendu (0 ou 1)
NotifyPlugins(3000)
' Attente fin de probe descente
While (GetOEMDRO(1000) = 0)
Sleep(10)
Wend
'Si succès, lancement de probe lent ver le haut
If (GetOEMDRO(1000) = 1) Then
SetOEMDRO(1000, 2) ' Numéro de l'axe ou faire le probe (0=X, 1=Y, 2=Z)
SetOEMDRO(1001,+10) ' Remontée en Z
SetOEMDRO(1002, 1) ' Feed rate
SetOEMDRO(1003, 9) ' Numéro de l'entré de plapage (1 à 16
SetOEMDRO(1004, 0) ' Attente re-laché de l'entrée 9
NotifyPlugins(3000)
' Attente fin de probe
While (GetOEMDRO(1000) = 0)
Sleep(10)
Wend
If (GetOEMDRO(1000) = 1) Then
ZProbe = GetOEMDRO(1001) ' Lecture de la position de palpage
Z = GetOEMDRO(85) ' Lecture positionactuelle
HPalpeur = 30 ' Déclaration hauteur palpeur
Zero = Z - ZProbe + HPalpe ' Distance erreur liée à deceleration
SetDRO(2, Zero) ' Initialisation zero pièce
Sleep(100)
NewZPos = Zero + 10 ' dégagement 10mm au dessus du
capteur
Code "G0 Z"&NewZPos
While IsMoving()
Wend
Else
'Message ("Fin de probe avec erreur palpage lent")
End If
Else
'Message ("Fin de probe avec erreur palpage rapide")
End If