Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: dave6272689 on July 10, 2009, 02:28:47 PM

Title: machine pauses after spindle/laser is triggerd
Post by: dave6272689 on July 10, 2009, 02:28:47 PM
i just built a laser cutter/engraver using smoothstepper and gecko320 and dc servos. all seems to work fine but when i try to cut something. it lights up the laser and pauses for about 1 second or so then starts to move. this would not be a problem if whatever i am cutting did not catch fire. i have no pause delays in the code. i am using pwm to control the laser power. any help would be great!
Title: Re: machine pauses after spindle/laser is triggerd
Post by: Chip on July 10, 2009, 02:56:18 PM
Hi, Dave

Have you checked the Spindle Setup in Port' & Pin's setting's.

Chip
Title: Re: machine pauses after spindle/laser is triggerd
Post by: dave6272689 on July 10, 2009, 06:10:37 PM
All of the deleys are set to zero. Is there something specific you think I should look for in that menu? Thanks
Title: Re: machine pauses after spindle/laser is triggerd
Post by: Chip on July 10, 2009, 07:23:42 PM
Hi, Dave

No just the delay setting's, There is a post on this issue, I'll try to find it, Hear it is, I don't think it was ever resolved though.

 http://www.machsupport.com/forum/index.php/topic,9086.0.html
Title: Re: machine pauses after spindle/laser is triggerd
Post by: dave6272689 on July 11, 2009, 03:18:23 AM
thanks for the read yes this is the same issue. but no one has fixed this yet! i will keep trying
Title: Re: machine pauses after spindle/laser is triggerd
Post by: RogerJames on August 15, 2009, 11:06:21 PM
Guys,

I'm having the same problem with a pause after M3 to turn laser on. I'm using the spindle output in PWM mode to control laser power.  

I need to cut intricate shapes in paper and fabric. And then make slits around the perimeter of each shape.

The first problem is the pause as discussed in this post which is burning up a lot of time (pardon the expression).
This has a secondary effect of creating a round burn spot much larger than the normal curf at the start of each slit and anywhere else a cut starts.

It would be helpful if the solution to this also included the ability to vary the power based on xy feed rate since my corners are also getting burnt round.

I have also tried to use the z axis to control the laser power but when I start moving the Z axis, the voltage jumps to 5V and dosen't drop back to 0V even after the Z-Axis has reached it's destination.
Other issues I can't get my head around if this turn out to be the answer:
1. how to cause the Z-Axis to turn on and stay turned on (would I tell it to go to 7million?)
2. how to setup the motor tuning for the Z to vary the PWM from 0 to 5V
3. how dro scaling would fit into the picture (As i've read in some other older posts)

So far I love Mach 3 but this is really throwing cold water on the project.

Please help... I'm getting desperate!

Thanks in advance.

Roger
Title: Re: machine pauses after spindle/laser is triggerd
Post by: vmax549 on August 16, 2009, 04:13:01 PM
OK for the corners CV should provide constant velocity.  IF not then it would be your CAMS job to provide the laser support code as far as laser power per feedrate.

Z axis feed to control the laser power,  NO

THE M3/delay with g1 has ALways been there and will probably never be changed even if it could be, Lasers are the only thing that would have an issue with this.

There may be a way around that by setting the  ACCell rate of the spindle output to a slower rate so the power would RAMP up preventing overheating/burning.

WOuld help you test but don't have a laser(;-) to play with

(;-) TP


Title: Re: machine pauses after spindle/laser is triggerd
Post by: RogerJames on August 16, 2009, 05:29:52 PM
TP,

It sounds like you have experience with the M3 delay. Is this something that is well known? If the M3 delay can't be fixed, I'm going to abandon this method of control and look for another method of control. Do you know if this is part of Mach3 or some broader issue?

As for CV mode, how would the CV mode be used to produce a relationship between spindle speed (laser power) and feed rate?

Thanks,

RJ
Title: Re: machine pauses after spindle/laser is triggerd
Post by: vmax549 on August 16, 2009, 05:44:37 PM
CV mode maintains a constant velocity of motion through curves and stops and starts. I t does not control spindle speed. IF you NEED to vary the speedle speed/laser output during a curve then that is the CAMS job not mach's

I would suggest try  slowing the accel curve in the spindle axis setup so the laser would ramp up to full power in the same delay as the motion(;-)

What values are you using to TUNE the spindle output when you used PWM output?  I come up with 60/1000/35 to match the .5 sec delay

(;-) TP
Title: Re: machine pauses after spindle/laser is triggerd
Post by: sshneider on August 16, 2009, 08:54:03 PM
Maybe I am missing something here but couldn't you just use another output other than what is designated for the spindle?

For example... let's say you use Output 4.  Set it to be used on a pin which is vacant.  Connect a 5VDC relay to that output and use that Relay to control your spindle.  Shouldn't be any delay there?

Then yiou would just need to create an M Code command to trigger the output from your program.  Not quite sure how to do that but I bet there are those smarter than me who could help???

Just a thought...

Sid
Title: Re: machine pauses after spindle/laser is triggerd
Post by: Chip on August 17, 2009, 01:05:33 AM
Hi, Roger

One piece to your puzzle, Remove the M3,M5's from your Cam Post's and use the Z Direction pin to trigger your Laser on & off, Z- neg. will turn it on and a Z+ pos. will turn it off, This should remove the delay's your experancing.

Hears a LazyCam post with the M3/M5 removed, If you use it with LC's Mill Load you shouldn't have delay's, If you use it with LC's Plasma Load you can have Pierce delays also and a Mill and Plasma G code file.

You'll need to work in a Safe Mode Lockout "Button" to jog around and insure the Z is left in a Z+ pos State, A logic IC that see's the Safe Mode Lockout "Button" state and the Z direction Pin's state to fire the Laser.

Just A Thought, Chip
Title: Re: machine pauses after spindle/laser is triggerd
Post by: vmax549 on August 17, 2009, 09:58:02 AM
WELL I 'll be learn something new every day. DO you still use the Spindle speed to set the laser power??

How do you set it in Gcode,  Looks like normal Gcode is out the door???

I'll need to save this info for when I get the 1/4" plate burner done(;-)

(;-) TP
Title: Re: machine pauses after spindle/laser is triggerd
Post by: RogerJames on August 17, 2009, 01:52:43 PM
Chip,

This goes along with what Sid was thinking (turning the laser on and off). The problem is, the laser is not a simple on off device. I also need a way of controlling the power (just like you would do to control the spindle speed with normal milling).

I suppose I could create an external circuit with a rheostat to manually control the power but this really seems like a hack. Besides I then loose all hope of doing some sort of CV type power modulation.

What type of laser are you running? How do you control the power level of your laser?

I’m wondering if I could use the onboard relay on my PMDX122 BOB to open and close the PWM circuit. This way I could use the spindle output to generate the PWM Signal. I would leave the spindle on all the time and just send a signal to the relay to allow the pwm to get thru to the laser or not. This should fix the delay (unless the control signal to the relay has the same delay problem.)

I wonder if there will be a switch bounce type problem induced?

Thanks,

RJ
Title: Re: machine pauses after spindle/laser is triggerd
Post by: RogerJames on August 17, 2009, 01:55:47 PM
If this relay switching the pwm signal turns out to work, I wonder if we could use one of the rotary axis to generate the pwm and inturn get the benifit of CV to vary the laser power?

Any thoughts?

RJ
Title: Re: machine pauses after spindle/laser is triggerd
Post by: Chip on August 17, 2009, 02:59:35 PM
Hi, RJ

I have a 150 watt Yag laser, Sad to say at this point haven't even fired it UP, This discussion of M3 delay has come up several times quite awhile back.

Spindle speed can still be used with "S" value set in the Post's, 0 or any value you wish, Turned off (0) for rapids, Spindle speed to set power in LC Post {SPEED} for Power during cut's.

PM message your Phone # or do you have Skype phone.

Hears a G code file and a LC post to look at.

Chip

Title: Re: machine pauses after spindle/laser is triggerd
Post by: Chip on August 18, 2009, 04:15:52 AM
Hi, RJ

What type of laser are you using and what Cam SW for your post's, Hears a couple of pic's of my Cut Screen (It's a work in progress screen set), Used it on our water jet cutter and testing stuff hear, with PWM power and the spindle override you should be able to control the power on the fly.

Hoping to work on the laser soon, Who-Now's,

Just trying too Help, Chip
Title: Re: machine pauses after spindle/laser is triggerd
Post by: vmax549 on August 18, 2009, 09:59:18 AM
HIYA CHIP, I have a question.

I see you are turning the laser on/off with the z dir pin, great idea.

bUT I also see you turn the laser on and off with the Sspeed call S0-S3000. IS there a need to do both???

ALso let me know when you are ready to fire the YAG. (;-) I am only an hour away.

(;-) TP
Title: Re: machine pauses after spindle/laser is triggerd
Post by: Chip on August 18, 2009, 11:30:37 AM
Hi, TP

The S(speed) gives the PWM signal to set the laser power and Dir pin use eliminates the Slow M3/M5 on/off Issue.

I've got a couple small YAG tubes (1-2 watt's), May start there, The power-supply for the big one is the size of a small Import Car (3 phase).  ???

We should talk sometime.  :D

Thanks, Chip
Title: Re: machine pauses after spindle/laser is triggerd
Post by: vmax549 on August 19, 2009, 05:31:06 PM
YES I see the use of the dir pin, BUT do you need to also throttle the power back to Zero as well or can you just leave the S set to the power level you need and use the dir pin as needed?

I think we need to hold a meeting of the local  Water Buffaloes (macherteers) Sometimes those up north there seem to have all the fun.

Might even get Brian to make the trip in the winter when it is freezing cold and snowing. Most of the time we just sit around under the palm tress and sip umbrella drinks all winter with nothing to do, NO SNOW to shovel and all that stuff. (;-)

(;-) TP
Title: Re: machine pauses after spindle/laser is triggerd
Post by: RogerJames on September 16, 2009, 12:48:02 PM
Hi guys,

It's been a while but...

I have tried the technique described above by Chip with very good success. What I did was to to generate a pwm signal from the spindle output and use the relay on my BOB (PMDX 122) to open and close the circuit between pin 16 (the pin outputting my pwm) and the laser. The relay is opened and closed with the direction signal from my Z-Axis (Since my machine has none). There is little or no delay like there was with the M3 / M5 commands.

In my gcode, the power level of the laser is changed with an S command from S 0 to S 100  for 0-100% power. So at the start of my program I toggle the direction to down to make sure the relay is open (G0 Z-.001), set the power with S command then turn on the spindle with M3 and leave the spindle on thru out the program. To toggle the laser on and off, I issue G0 Z0.001 for laser on and G0 Z-0.001 for laser off.  At the end  of my program, I issue M5 to turn off pulse generation.

I can post more info about my setup when I get home (I'm on lunch at work now) if anyone is interested. Just let me know.

The next step is to figure out how to vary the power as a function of the speed of the x and y axis while using the relay to open close the signal to the laser unit. I would like to use one of the rotary axis to generate the pulses instead of the spindle but haven't yet figured out the setup to do this. Any suggestions are welcome.

Thanks for all the help guys.

Roger
Title: Re: machine pauses after spindle/laser is triggerd
Post by: Astroguy on September 16, 2009, 02:40:07 PM
Hi guys, I am watching this thread. I am also in the process of putting together a laser system. I have a 70 watt fiber launched laser I am controlling with a Xantrex 12-100 power supply. I plan on using a DC-03 DigiSpeed GX V3 to convert the PWM signal to a 0-5 volt analog signal to send to the Xantrex power supply to modulate the laser power. I know a little more about lasers than I do g-code and was hoping I would be able to find a cheap way to generate the code necessary for laser cutting and engraving. I am starting to think I may be in over my head.
Title: Re: machine pauses after spindle/laser is triggerd
Post by: RogerJames on September 16, 2009, 09:42:00 PM
Astro,

The gcode is pretty easy. If the shape you want to cut out is in dxf or can be translated to it, you can open it in lazycam and post it out to G-Code. You will probably have to edit it to make it work for your laser. This can be done with 3 or 4 find and replace operations in a text editor.

Lazycam, as you may already know, comes with Mach3.

Good luck,

Roger
Title: Re: machine pauses after spindle/laser is triggerd
Post by: matd on October 12, 2009, 11:44:11 AM
Hi guys,

It's been a while but...

I have tried the technique described above by Chip with very good success. What I did was to to generate a pwm signal from the spindle output and use the relay on my BOB (PMDX 122) to open and close the circuit between pin 16 (the pin outputting my pwm) and the laser. The relay is opened and closed with the direction signal from my Z-Axis (Since my machine has none). There is little or no delay like there was with the M3 / M5 commands.

In my gcode, the power level of the laser is changed with an S command from S 0 to S 100  for 0-100% power. So at the start of my program I toggle the direction to down to make sure the relay is open (G0 Z-.001), set the power with S command then turn on the spindle with M3 and leave the spindle on thru out the program. To toggle the laser on and off, I issue G0 Z0.001 for laser on and G0 Z-0.001 for laser off.  At the end  of my program, I issue M5 to turn off pulse generation.

I can post more info about my setup when I get home (I'm on lunch at work now) if anyone is interested. Just let me know.

The next step is to figure out how to vary the power as a function of the speed of the x and y axis while using the relay to open close the signal to the laser unit. I would like to use one of the rotary axis to generate the pulses instead of the spindle but haven't yet figured out the setup to do this. Any suggestions are welcome.

Thanks for all the help guys.

Roger

Hi,

I'm having the same problem here.
How do you convert the Dir + or Dir - from the Z axis to a 0 or 5V signal ? What schematic/electronics do you use?
I was thinking about making a simple electronic tim delay on the signal, would't this also work?
Title: Re: machine pauses after spindle/laser is triggerd
Post by: Astroguy on October 12, 2009, 12:08:57 PM
This is what I plan on using http://homanndesigns.com/store/index.php?main_page=product_info&cPath=1&products_id=21 (http://homanndesigns.com/store/index.php?main_page=product_info&cPath=1&products_id=21) it will take the PWM signal from Mark3 and convert it to a 0-5 volt analog signal.
Title: Re: machine pauses after spindle/laser is triggerd
Post by: Tweakie.CNC on October 12, 2009, 12:20:02 PM
Thanks for the link - that looks like a nice piece of kit for the spindle control.

Tweakie.
Title: Re: machine pauses after spindle/laser is triggerd
Post by: RogerJames on October 13, 2009, 08:30:11 AM
On my machine, I am using the pwm signal from my PMDX-122 BOB directly as the 0-5V control voltage. No hardware other than my bob is required. If you put an analog volt meter on the "spindle" signal wire you will see the voltage appear to vary from 0 - 5V as the spindle speed is changed in mach 3.

In my case, the laser tube came out of a working unit (the table was just too small). Before dissassemblinig the unit, I put a scope on it. The control signal turned out to be a 5V PWM signal (The tube is a Synrad RF excited Co2 25Watt)

Let me know if you need to know how to the get pwm signal.

Regards,

Roger


Title: Re: machine pauses after spindle/laser is triggerd
Post by: Astroguy on October 13, 2009, 08:57:35 AM
On my machine, I am using the pwm signal from my PMDX-122 BOB directly as the 0-5V control voltage. No hardware other than my bob is required. If you put an analog volt meter on the "spindle" signal wire you will see the voltage appear to vary from 0 - 5V as the spindle speed is changed in mach 3.

In my case, the laser tube came out of a working unit (the table was just too small). Before dissassemblinig the unit, I put a scope on it. The control signal turned out to be a 5V PWM signal (The tube is a Synrad RF excited Co2 25Watt)

Let me know if you need to know how to the get pwm signal.

Regards,

Roger




Yes, I would like to hear how you get the PWM signal.
Title: Re: machine pauses after spindle/laser is triggerd
Post by: RogerJames on October 13, 2009, 09:33:59 AM
Sorry Matd,

I just reread your post and see that you were already asking how to make the pwm signal. As I said in my earlier post, no hardware other than my bob is required (in my case anyway).

To make the pwm signal, in mach, setup the spindle to make the pwm and the z axis to turn it on and off (since I assume your laser machine doesn't have an actual spindle or z-axis). To do this, go to "ports and pins" on the "Spindle Setup" tab set the following in the Motor Control section: "Use spindle motor output" to on, "PWM Control" to on. "PWMBASE Freq to 4166 (I could use some help understanding this. I do know a lower freq seems to cause the power to be lower (I think)) "Minimum PWM" set to 0. In the "General Parameters" section set all delays to 0. In "Special Options" everything is off.

In the "Motor Outputs" tab, The spindle is set up as follows: Enalbed checked, step pin set to 16, the dir pin is 0 (we are not changing the direction of the spindle signal. remember we are using the Z-axis to do that.) Dir LowActive and Setp Low Active both unchecked. Step and dir ports both set to 1.

Also in the "Motor outputs" tab, set the Z-Axis as follows (all we are using is the direction signal). Enabled checked, step pin is 0, dir pin 1, dir lowactive checked, step lowactive unchecked, step and dir ports set to 1. ) I have to use pin 1 which is hardwired in my bob to control the relay on my bob.

Under Config>Spindle Pulleys, set the current pulley to number 1, min speed = 0, max speed 100, ratio 1, reversed off.

Of course, you can change the pins per your setup. In this case though, I have two wires going to the control terminals on my laser.... one from the common on my BOB, the other is hooked to the normally open side of the relay on my bob. The common side of the relay is hooked to pin 16 (the pwm signal). This way the relay can open and close the circuit which is sending the pwm to the laser.

Hope this helps,

Roger