Hello Guest it is March 28, 2024, 05:43:54 AM

Author Topic: custom application  (Read 14051 times)

0 Members and 1 Guest are viewing this topic.

Offline ger21

*
  • *
  •  6,295 6,295
    • View Profile
    • The CNC Woodworker
Re: custom application
« Reply #10 on: October 21, 2010, 11:37:17 AM »
The spindle delay is set in the spindle tab of Ports and Pins.
Gerry

2010 Screenset
http://www.thecncwoodworker.com/2010.html

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: custom application
« Reply #11 on: October 21, 2010, 01:12:35 PM »
Please show an example of the code with M11 and M10 in it as it works fine here.
Regards the spindle delay options, my mistake, its on Ports and Pins, Spindle Setup.
Hood
Re: custom application
« Reply #12 on: October 21, 2010, 02:00:35 PM »
Thanks for the suggestions... will try all out within the hour.

sample of code:

G90
N1 G0
N2 X0.0000 Y4.4625 F50.000
M11
M10
N3 X0.0000 Y4.6975
M11
M10
N12 G0
M0
M30

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: custom application
« Reply #13 on: October 21, 2010, 02:24:38 PM »
If you read what I said regards M11/M10 you will see you need to command a move before it will actually operate. That is why I suggested you set up a dummy axis. Added to that you need to specify the output which you wish to operate, you do this with the P word, eg M11P1 will switch on OutPut 1 when you subsequently command a G0 or G1 move.
You may also have to introduce a dwell time via a G4 because if you dont then the outpout will be switched on and off instantl;y and your solenoid may never see the signal, you can set the dwell as milliseconds if you wish (General Config page, last column).
For the code to work you would need

G90
N1 G0
N2 X0.0000 Y4.4625 F50.000
M11P1
G0Z0.0001
G4P1
M10P1
G0Z0
N3 X0.0000 Y4.6975
etc
Re: custom application
« Reply #14 on: October 21, 2010, 06:59:57 PM »
Sorry for the confusion... that sample was only one of the versions I tried... I also tried this with no effect :

G90
N1 G0
N2 X0.0000 Y4.4625 F50.000
M11P1
G0Z0
M10P1
G0Z0
N4 X0.0000 Y4.9325 
M11P1
G0Z0
M10P1
G0Z0
N12 G0
M0
M30

I also tried a version of the above only with P1 after the M codes... no G0Z0 - no change...

I think the only difference I see is a slight Z value and it has no G4 dwell in it... was not sure how critical it was... anyways it skipped right over this also... none of the other suggestions worked and I do have the solenoid right at the trigger and only running about 6 inches of airline, so there should be no mechanical delay. I will try exactly what you suggest as code.
I also looked at that spindle setup and again did not see anything glaring... will try to post pic of the screen - working on a minimal PC setup...

Thanks.

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: custom application
« Reply #15 on: October 21, 2010, 07:13:13 PM »
As said you will need a delay of some sort between the M11 and M10,  whether that is a G4 or a longer distance on the Z move is up to you which way would work best. I think the G4 would be the easiest as you could change that quickly to find the optimum setting. Again remember on General Config page you can set G4 to be in milli seconds if you wish, so for example G4P1000 would be 1 second.

As for the spindle settings here is where I mean, remember though this will not affect the M11/M10 but just M3/M4/M5.
Hood
« Last Edit: October 21, 2010, 07:15:01 PM by Hood »

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: custom application
« Reply #16 on: October 21, 2010, 07:21:59 PM »
Also remember if you are going to use the Z axis to act as the trigger for the M11/M10 you will need to enable it in Motor Outputs.
Hood
Re: custom application
« Reply #17 on: October 21, 2010, 08:25:44 PM »
Tried M11/M10 code exactly as you wrote... still no results and no lights on output 1 on diagnostic page... I have not checked motor output if enabled... here is a screen shot of my spindle setup - everything set to Zero...

I will keep trying but that's it for tonight... it's 8:30 and I have been on it all day - time for a Scotch !

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: custom application
« Reply #18 on: October 22, 2010, 02:14:26 AM »
Unless the motor output for Z is enabled it will not work.
If you still dont get it to work then please attach your xml and I will test here with it to see if I can find the issue.
Hood

Offline Tweakie.CNC

*
  • *
  •  9,196 9,196
  • Super Kitty
    • View Profile
Re: custom application
« Reply #19 on: October 22, 2010, 02:47:00 AM »
I have tried various combination of commands in order to switch my laser on and off with the minimum possible delay.
I was getting good results with the M10/M11 combination up until I loaded a later revision of Mach (can't remember the original version number)  when unpredicted results started to occur. Despite a considerable amount of time being spent on various combination's of commands and tests the problem has yet to be resolved. This has led me back to the 'axis direction pin' method of control which is undoubtedly the fastest and most reliable method.

I have described the method I use here http://www.cooperman.talktalk.net/files/27_files/Page652.htm

This may be of some assistance to you if you need to achieve absolute minimal delays in triggering an external control coincident with axis movement.

Tweakie.
PEACE