Hello Guest it is March 28, 2024, 09:06:35 AM

Author Topic: VBCodes for x-y-z-positions to modify  (Read 5223 times)

0 Members and 1 Guest are viewing this topic.

VBCodes for x-y-z-positions to modify
« 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

Offline Bodini

*
  •  216 216
    • View Profile
Re: VBCodes for x-y-z-positions to modify
« 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

Offline Bodini

*
  •  216 216
    • View Profile
Re: VBCodes for x-y-z-positions to modify
« Reply #2 on: December 08, 2007, 11:19:45 PM »
oh yeah, try 'SetOemDro' and 'GetOemDro' too.
Re: VBCodes for x-y-z-positions to modify
« 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