Hello Guest it is April 24, 2024, 10:02:23 PM

Author Topic: machscreen .. adding dro and script from button??  (Read 1777 times)

0 Members and 1 Guest are viewing this topic.

machscreen .. adding dro and script from button??
« on: February 20, 2022, 10:12:23 AM »
hi!
2 questions :)

i playing with my mach3 and machscreen..

1.
i have add a button to my screen.
i wrote a vbscript and save them.in the macro folder.

name of the script is HomeTurret.

now i want to load this script as file when i hit the button.
if i change something on the script i dont want to add the script again with machscreen.

is this possible??? can someone help me?


2.

when i do a toolchange my turret jogs to x5 z55.
this values are named wzwx and wzwz
i add 2 dro to my screen.
i wish that the dros show me wzwx (5) and wzwz (55).
and i want.. if i change the value in the dro.. that is set wzwx and wzwz to this.

example : in the dro i put in 10 and 60.
then the machine jogs to x10 and z60.

its to set a toolchange position.

is this possible?!
thanks

Offline Graham Waterworth

*
  • *
  •  2,673 2,673
  • Yorkshire Dales, England
    • View Profile
Re: machscreen .. adding dro and script from button??
« Reply #1 on: February 20, 2022, 12:23:07 PM »
You add the following line to the execute script section of the button property

Filepath = "\mach3\macros\Mach3Mill\YOUR_MACRO"
RunScript(Filepath)

Use G53 values for the tool change position.  To get these click the machine DRO button, these do not change when you reset the fixture offsets.

« Last Edit: February 20, 2022, 12:25:47 PM by Graham Waterworth »
Without engineers the world stops
Re: machscreen .. adding dro and script from button??
« Reply #2 on: February 20, 2022, 12:25:00 PM »
nice!

works.. perfect... and what about the dro??? is this possible????


thanks!!

Offline TPS

*
  •  2,505 2,505
    • View Profile
Re: machscreen .. adding dro and script from button??
« Reply #3 on: April 22, 2022, 01:17:42 PM »
for example your OEMDro's are:

wzwx = OEMDro(1200) and wzwz = OEMDro(1201)

the VBCode would be:
Code: [Select]
  Code ("G1 X" &GetOEMDro(1200) &" Z" &GetOEMDro(1201) &" F123")

btw.

https://www.machsupport.com/wp-content/uploads/2013/02/Mach3_V3.x_Macro_Prog_Ref.pdf

is allways good to have
anything is possible, just try to do it.
if you find some mistakes, in my bad bavarian english,they are yours.
Re: machscreen .. adding dro and script from button??
« Reply #4 on: April 23, 2022, 07:16:31 AM »
thanks!
but why g1?!

if i am at home i would check it.

Offline TPS

*
  •  2,505 2,505
    • View Profile
Re: machscreen .. adding dro and script from button??
« Reply #5 on: April 23, 2022, 07:21:10 AM »
you can also use a G0
anything is possible, just try to do it.
if you find some mistakes, in my bad bavarian english,they are yours.
Re: machscreen .. adding dro and script from button??
« Reply #6 on: April 23, 2022, 07:27:55 AM »
wzwx and wzwz is to set the position.
not to go to the position.

i want to use the dro wzwx and wzwz to set the position which is used when g53 is entered.. or better... when i call t0101 or something what make a toolchange.

hope you understand?
thanks

Offline TPS

*
  •  2,505 2,505
    • View Profile
Re: machscreen .. adding dro and script from button??
« Reply #7 on: April 24, 2022, 03:56:48 AM »
for toolchange normaly M6Start.M1S and depending on the way you do your toolchange M6End.M1S
are used.

do at the begin of M6Start a

Code: [Select]
  Code ("G53 G1 X" &GetOEMDro(1200) &" Z" &GetOEMDro(1201) &" F123")

will allways bring the machine first to a tool change position.
anything is possible, just try to do it.
if you find some mistakes, in my bad bavarian english,they are yours.