Hello Guest it is June 22, 2025, 12:08:17 AM

Recent Posts

Pages: « 1 2 3 4 5 6 7 8 9 10 »
31
General Mach Discussion / Re: Macro/Script rodillos de sujeccion fresadora
« Last post by TPS on June 07, 2025, 02:43:52 AM »
maybe OEMDro(185) will do the job
32
General Mach Discussion / Re: Macro/Script rodillos de sujeccion fresadora
« Last post by TPS on June 07, 2025, 02:36:10 AM »
here:

https://www.machsupport.com/forum/index.php?topic=19482.0

you can download a list of all DRO's / OEMDro's

OEMDro(801) is the current Y-Coord
Dro(84) is Y-MachineCoord

and there a couple of other's

i usually allways use OemDro(801)

33
General Mach Discussion / Re: Macro/Script rodillos de sujeccion fresadora
« Last post by Tecmaqcnc on June 07, 2025, 02:04:21 AM »
The OEMDRO 801 is a multifunction device that can be used for Machine Coordinates, Work, or DTG. How do we select one of these three functions?
34
General Mach Discussion / Re: Macro/Script rodillos de sujeccion fresadora
« Last post by Tecmaqcnc on June 06, 2025, 01:08:31 PM »
If you look at the message generated in the VB script, the ActY value is the machine coordinate.

The MinY value refers to the minimum absolute machine coordinate.

Only the MaxY value is actually how we want to compare it with the MaxY in G code.

This is strange, since, as you say, 5 and 11 refer to G code.

Only OEM Dro 11 is working as we want.
35
General Mach Discussion / Re: Macro/Script rodillos de sujeccion fresadora
« Last post by TPS on June 06, 2025, 11:38:40 AM »
if i load i simple G-code here i can see the Min/Max values from G-Code program in program limit's
this is what OEMDro(5) and OEMDro(11) are normaly showing.

and ActY is what this Axis DRO is showing
36
General Mach Discussion / Re: Macro/Script rodillos de sujeccion fresadora
« Last post by Tecmaqcnc on June 06, 2025, 07:11:05 AM »
I've fixed the msg issue in the script.

The ActY takes data from the Yact machine, so it's invalid. We need MaxY and MinY from the G-code.


The code:

'Get the current values
ActY = GetOEMDro(801)
MinYCoord = GetOEMDro(5)
MaxYCoord = GetOEMDro(11)

MsgBox "ActY: " &ActY &" MinY: " &MinYCoord &" MaxYcoord; " &MaxYCoord



'front lowering
If ActY >= (MinYCoord) Then'<=
ActivateSignal(OUTPUT11)
End If
'front raising
If ActY <= (MinYCoord) Then'<=
DeActivateSignal(OUTPUT11)
End If
'rear lowering
If ActY >= (MaxYCoord) Then'<=
ActivateSignal(OUTPUT10)
End If
'front raising
If ActY <= (MaxYCoord) Then'>=
DeActivateSignal(OUTPUT10)
End If
 
   
      
If(GetInBit(90, 2)) And Not (GetOemLed(800)) Then
   Code(" G55")
   Espera
   If getDro (24) = 2 Then
      Code("G52 X-275.95 Y167.36 ")
      Espera
   End If
   If getDro (24) = 3 Then
      Code("G52 X-551.09 Y-2.87 Z0")
      Espera
   End If
   Espera

End If

If(GetInBit(90, 3)) And Not (GetOemLed(800)) Then
   Code(" G56")
   Espera
   If getDro (24) = 2 Then
      Code("G52 X-275.95 Y167.36 ")
      Espera
   End If
   If getDro (24) = 3 Then
      Code("G52 X-551.09 Y-2.87 Z0")
      Espera
   End If

End If
      
      
End

 ' -----------------------------------------------------------------------------
Sub Espera ()
   While IsMoving()
      Sleep(15)
   Wend
End Sub
' -----------------------------------------------------------------------------

                                                         
37
General Mach Discussion / Re: Macro/Script rodillos de sujeccion fresadora
« Last post by TPS on June 06, 2025, 06:50:31 AM »
then there is a bug in line 15 of your code.
pls post excactly the code of the VB scripter window.
38
General Mach Discussion / Re: Macro/Script rodillos de sujeccion fresadora
« Last post by Tecmaqcnc on June 06, 2025, 03:07:44 AM »
This image
39
General Mach Discussion / Re: Macro/Script rodillos de sujeccion fresadora
« Last post by Tecmaqcnc on June 06, 2025, 02:55:41 AM »
This mesag in the screen
40
General Mach Discussion / Re: Macro/Script rodillos de sujeccion fresadora
« Last post by TPS on June 06, 2025, 02:34:55 AM »
copy this code:

Code: [Select]
'Get the current values
ActY = GetOEMDro(801)
MinYCoord = GetOEMDro(5)
MaxYCoord = GetOEMDro(11)

MsgBox "ActY: " &ActY &" MinY: " &MinYCoord &" MaxYcoord; " &MaxYCoord

into VB Scripter window and press the run button, then you will get a messagebox with coordinates
to see the real coordinates and post the  result
Pages: « 1 2 3 4 5 6 7 8 9 10 »