Welcome, Guest. Please login or register.
Did you miss your activation email?
May 28, 2012, 11:16:32 AM

Login with username, password and session length
Search:     Advanced search
* Home Help Search Calendar Links Login Register
+  Machsupport Forum
|-+  Mach Discussion
| |-+  Mach Screens
| | |-+  Screen designer tips and tutorials
| | | |-+  VBCodes for x-y-z-positions to modify
Pages: 1   Go Down
Print
Author Topic: VBCodes for x-y-z-positions to modify  (Read 2749 times)
0 Members and 2 Guests are viewing this topic.
Holger0815
Active Member

Offline Offline

Posts: 19


View Profile
« on: December 08, 2007, 11:36:46 AM »

Hi,
I'm going to add some buttons to a screen of mine. Task is this: I mounted a camera to the z-axis with an offset to the tool of approx 60x40mm. I want to drill PCBs. To adjust the PCB before drilling I want to make a button (calling a script) what adds the offset between cam and tool to the xy coordinates and then move the controlled point back to the (stored) coordinates. State will be remembered in a userLED. By pressing the button again the offset will be subtracted in the same way (depending of the LED state there will be add/subtract). So I can switch between Cam and Tool to align the PCB and drill the PCB.

Manually I will get this result by writing a value into the x (y, z) DRO e.g. on screen 1.
But up to now I didn't manage to do this by an VB-script:
I tried to GET/SETDRO(0), this should be the X DRO acc to wiki.
I tried the OEM DRO 184-186, this should be "X cont.Pnt.coord DRO" acc. to wiki,
I tried to get/setParam("XDRO") ...

No result, the Axis DRO was never modified.
Could anyone give me a hint how to ?
Thanks so much! You would rescue my weekend ;-)

Regards
Holger
Logged
Bodini
Active Member

Offline Offline

Posts: 112



View Profile
« Reply #1 on: December 08, 2007, 11:17:08 PM »

I tried to GET/SETDRO(0), this should be the X DRO acc to wiki.

X dro is 800, y is 801, z is 802
Logged
Bodini
Active Member

Offline Offline

Posts: 112



View Profile
« Reply #2 on: December 08, 2007, 11:19:45 PM »

oh yeah, try 'SetOemDro' and 'GetOemDro' too.
Logged
Holger0815
Active Member

Offline Offline

Posts: 19


View Profile
« Reply #3 on: December 11, 2007, 04:04:40 PM »

Thanks.
I worked around it by modifying the param values of the current work offset and applying this offset then again.
Works well.
Regards
Holger
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!