Welcome, Guest. Please login or register.
Did you miss your activation email?
May 28, 2012, 02:08:23 PM

Login with username, password and session length
Search:     Advanced search
* Home Help Search Calendar Links Login Register
+  Machsupport Forum
|-+  Mach Discussion
| |-+  VB and the development of wizards
| | |-+  Probing with G31 problem
Pages: 1   Go Down
Print
Author Topic: Probing with G31 problem  (Read 1429 times)
0 Members and 1 Guest are viewing this topic.
Ben
Active Member

Offline Offline

Posts: 73


View Profile
« on: September 05, 2008, 05:32:20 PM »

Riddle me this.  G31Y0.7 will work in MIDI, it will advance to touch and stop, if no touch it will stop when reaching Y=0.7. As it should.

I attach it to a button. Press the button and nothing happens. Choose Operator > Edit button script> select the button, change nothing and save. The file runs as soon as I close the editor (if reset allows). But wont run when the button is pressed. Any ideas? TIA Ben

SetUserLabel 200,"Start probing"
Code "G31 Y0.7"
While IsMoving()      
Wend
SetUserLabel 200,"Finished probing"
Logged
Ben
Active Member

Offline Offline

Posts: 73


View Profile
« Reply #1 on: September 07, 2008, 05:54:18 PM »

No more riddle. I took out the ismoving statements and it works OK.
Logged
Ben
Active Member

Offline Offline

Posts: 73


View Profile
« Reply #2 on: September 07, 2008, 10:11:27 PM »

Riddle back. Take out the ismoving and the code runs to end before the probe stops. Therefor I cant get the touch position. I need the ismoving but it hangs up when ever i put it in no matter where and nothing will move, the program stops at the While ismoving() statement as shown below.
Logged
Bodini
Active Member

Offline Offline

Posts: 112



View Profile
« Reply #3 on: September 08, 2008, 09:00:14 AM »

I use this:

Code:
While IsMoving()
sleep 100
Wend

I believe that if you are using v2.63 or later, you do not need the Declare sub sleep thing at the start of the macro.  Otherwise, it's:
Code:
Declare Sub Sleep Lib "Kernel32" (ByVal dwMilliseconds As Long)

-Nick
Logged
Ben
Active Member

Offline Offline

Posts: 73


View Profile
« Reply #4 on: September 08, 2008, 12:57:45 PM »

Thanks for the help. Im using Ver R3.038. I tried both and the same result. The program hangs up on the ismoving() statement. But Z dosent move

SetUserLabel 200,"Start probing"
Code "G31 Z0.7"
While IsMoving()
sleep 100     
Wend
SetUserLabel 200,"Finished probing"

Im trying to get my probe to find the top surface and then move to Z=0.100.
Logged
Ben
Active Member

Offline Offline

Posts: 73


View Profile
« Reply #5 on: September 08, 2008, 04:05:49 PM »

I went back to Ver2.63 and it all works fine. Something wrong in Ver3.038. Ben
Logged
Bodini
Active Member

Offline Offline

Posts: 112



View Profile
« Reply #6 on: September 08, 2008, 05:25:23 PM »

FIFY (fixed it for you).

"I went back to Ver2.63 and it all works fine. Something wrong in Ver3+. Ben"

 Wink Grin
Logged
Pages: 1   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!