Hello Guest it is March 19, 2024, 05:25:20 AM

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - TPS

1741
VB and the development of wizards / Re: macro tube center modification
« on: April 22, 2018, 04:39:08 AM »
SetOEMDro(1152,measuredY + GetOEMDro(1000))

somewhere after measuredY  is calculated

1742
put the code in VB Scripter Window step through a see where it Fails.

1743
here your modified code, pls test carefully because i have not tested it.
it is just minimal code without any checks like , probe allready grounded when start, or no probe was hit.

Code:
'probe z surface macro
Sub Main()
   FeedCurrent = GetOemDRO(818)   'Get the current settings, OEM DROs (818)=Feedrate DRO
   ZCurrent = GetOemDro(802)      'OEM DROs (802)=Z DRO
   GageH = GetOEMDRO(1001)         'OEMDRO(1001)=Gage Block Height
   ZNew = -300                  'probe down 300 mm

   Code "G90F200"      'slow feed rate to 200 MM/MIN
   Sleep(200)         
   Code "G31 Z" &ZNew      'probe Z- 300 mm
   While IsMoving()
      Sleep(10)
   Wend
   ZTouch = GetVar(2002)
   'Go back to point where probe was hit
   code "G0 Z" &ZTouch
   While IsMoving()
      Sleep(10)
   Wend
   
   'set new z height
   Call SetDro (2,GageH)   'DRO(2)=Z DRO

   FinalMove = GageH + 10
   Code  "G0 Z" &FinalMove
   'return old feedrate
   Code "F" &FeedCurrent   'restore starting feed rate   

End Sub   

1744

this 3 works fine...

8.-  But..  if i mix the 3 into one large script.....
the machine works erratic..


IMHO your script's have some  minor "leaks".

first read about GetVar(2000) to GetVar(2002), here are the values stored, where the the probe was hit,
because you will allways get an overrun of the axis caused by the decceleration during stop. so the usage
of  this values is elementary (for me) for precise probing.

i personaly put allways after a movement instruction caused by script (G0 / G1) a

While IsMoving()
 Sleep(10)
Wend

if you add this While IsMoving() to your code, you will see that the code will be a lot more
than you exepect.

you can also read about a Little bit here:

http://www.machsupport.com/forum/index.php/topic,36784.msg252331.html#msg252331



 


1745
General Mach Discussion / Re: Get Optional Stop/M01 to stay off?
« on: April 20, 2018, 03:50:59 AM »
if you mean the Optional Stop witch is enabled/disabled by button, you can
add some code to macropump


If Not GetOEMLed(65) Then
  DoOemButton(177)
End If

1746
General Mach Discussion / Re: Messaging is wrong
« on: April 20, 2018, 03:41:24 AM »
the message box has real low priority. so for example

this macro code:

message "message 1"
message "message 2"
message "message 3"
message "message 4"
message "message 5"
message "message 6"
message "message 7"

will maybe Show two or three of the Messages


this macro code:

message "message 1"
Sleep(200)
message "message 2"
Sleep(200)
message "message 3"
Sleep(200)
message "message 4"
Sleep(200)
message "message 5"
Sleep(200)
message "message 6"
Sleep(200)
message "message 7"

will Show all of them and all will be reported in the history file.
even if there are other codelines between (if they have low excecution time)




1747
General Mach Discussion / Re: Macro or brain???? Help needed
« on: April 20, 2018, 03:26:54 AM »
if you want to toogle an Output by button, vbscript would be the choice.
for example

Code: [Select]
If IsActive(OUTPUT1) Then
  DeactivateSignal(OUTPUT1)
Else
  ActivateSignal(OUTPUT1)
End If

1748
General Mach Discussion / Re: G31 Probing with G68 Rotation enabled
« on: April 20, 2018, 03:17:56 AM »
made a compare of your profiles.

i can see three things witch may influence the probing, but i am not sure, but you can test.

here the three setting's i noticed:
- distance mode
- IJ mode
- soflimit's

Thomas

btw. here is a good mach3 Profile Viewer where you can also compare two profile's.

http://www.kd-dietz.com/klausphp/pages/eng/machprofile/description/m_profile_description.html

1749
General Mach Discussion / Re: Need Stop before running script
« on: April 20, 2018, 02:43:59 AM »
glad to hear that it is working now.

btw witch Version are you running, just to keep in mind.

Thank You

1750
General Mach Discussion / Re: G31 Probing with G68 Rotation enabled
« on: April 19, 2018, 12:55:12 AM »
i am out today, will have a look tomorrow.