Machsupport Forum

Mach Discussion => VB and the development of wizards => Topic started by: Csabika on May 23, 2010, 04:17:41 PM

Title: mach3 and beam saw
Post by: Csabika on May 23, 2010, 04:17:41 PM
Helo!

Make old machine control exchange on a saw, Mach3 controls it and DSPMC - Ethernet Motion Controller
The problem:
a macro would be needed what does a process if it is X the value of an axis smaller than 150 mm ,
so X let an axis go onto a size there let him wait give one M9 code, and let him go to the back 200mm
I tried to do it, but since 0 are his starting values x axis, the mach does nothing at the time of a departure

Regards Csaba
???
Title: Re: mach3 and beam saw
Post by: Csabika on May 25, 2010, 02:06:10 AM
There is not a solution, please help me!
Title: Re: mach3 and beam saw
Post by: stirling on May 25, 2010, 10:56:31 AM
Hi Csabika - welcome to the forum.

Can you explain again what you're trying to do? Also can you attach your macro as far as you have got please?
Title: Re: mach3 and beam saw
Post by: Csabika on May 25, 2010, 06:06:32 PM
Hi stirling!

Remake beam saw.
The problem:
Small size the saw takes on the motive construction,
it is necessary to release the sheet after standing for a size because of this

macropump.m1s

CurrentXposition = GetOemdro(842)

If CurrentXposition <= 150 Then
code "M9"
Else
code"G90 x300"
End If

Title: Re: mach3 and beam saw
Post by: stirling on May 26, 2010, 03:47:44 AM
Hi Csabika - Sorry but I'm still not sure what you want to do. But if I describe what your macro is doing it may help you to find a solution.

A macropump driven macro runs every 10th of a second - continually. Therefore when X<=150 it will just execute an M9 over and over again - forever - until something else (your gcode maybe?) moves X over 150. BUT - when X>150 it will execute a G90 X300 over and over again - forever - again until something else moves it less than 150. Then of course your back in the first condition - etc. etc.

Cheers

Ian
Title: Re: mach3 and beam saw
Post by: Csabika on May 26, 2010, 04:28:54 PM
Hi Ian!
Yeah! I do not know the solution because of this.Because, with the first occasion when X<150 runs down then the macro, but the machine leaves so that X=0 and the macro runs immediately already that switches it over to 300 and is frozen off there! I gave a thought to it how I put a switch onto the beam and when the motive construction is so near that the intestine of the saw would cut it X into an axis presses the switch before it and a macro runs down onto the sign of that switch then and it sends it backwards X axis.

thanks!

Csaba

Title: Re: mach3 and beam saw
Post by: stirling on May 27, 2010, 11:13:11 AM
Csabika - can you attach your gcode file please?

Cheers

Ian
Title: Re: mach3 and beam saw
Post by: Csabika on May 27, 2010, 12:48:46 PM
Hi Stirling!

A code detail, a board starts his length:

M3
g0 x2000
m7
m8g04p2
y1500
m9g04p2y0
x800
m7
m8g04p3
y1500
m9g04p2y0
m5
y0
M3
g0 x100
m7
m8g04p2
y1500
m9g04p2y0

It M codes control valves

csabika
Title: Re: mach3 and beam saw
Post by: stirling on May 28, 2010, 03:39:28 AM
Hi csabika - maybe I'm missing the point - but I can't see why you need a macro at all and certainly not a macropump. Your gcode is completely predictable (as is gcode generally) so you KNOW where it's going to be at any time. You don't need to say "IF X < anything" because you commanded it to be there. Just write your gcode to do whatever it is you want with your saw and it will do it.

FWIW - you need to command a Feedrate and use G1 for your cuts. At the moment you are cutting at RAPID (G0) speed - generally not good practice.

Hope this helps - Ian
Title: Re: mach3 and beam saw
Post by: Csabika on May 28, 2010, 02:07:21 PM
Hi Stirling!

I make!
for me a problem ,
If the size is small, A saw cuts into iron
I turned up output1 let an be a pliers, and made macropump
if input gives a sign, releases it the pliers, and an axis goes to the back 200mm
Title: Re: mach3 and beam saw
Post by: ger21 on May 28, 2010, 10:27:42 PM
I think you mean it cuts the clamps on small parts? So after the beam comes down, you want to open the clamps, and back them up before the cut?

How are you creating the g-code? I think what you want to do may be better handled in the g-code, or whatever creates it.
Title: Re: mach3 and beam saw
Post by: Csabika on May 29, 2010, 06:00:09 PM
Hi Ger21

G code create other program!

I have to watch it let him not cut the clamps, which moves the board, off.

Csaba
Title: Re: mach3 and beam saw
Post by: Csabika on June 22, 2010, 03:34:19 AM
Hi

I did code, if one input is active then run macro.
There's also a task in your gcode,  y and u  to replace the x letters marked.
World Cup so you can VB sript?