Home
Downloads
Mach3
Plugins
CAM Post Processors
Screensets
Purchase
Support
Forum
Tutorial Videos
Documentation
Yahoo Group
Mach Wiki
Resources
Contact Us
Links
CNCZone
German Forum
Italian Forum
Korean Forum
Portugese (Brazil) Forum
Russian Forum (RSK CNCROUTER)
Thai Forum
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
May 26, 2012, 07:54:24 AM
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Search:
Advanced search
Select from and to languages
Chinese-simp to English
Chinese-trad to English
English to Chinese-simp
English to Chinese-trad
English to Dutch
English to French
English to German
English to Greek
English to Italian
English to Japanese
English to Korean
English to Portuguese
English to Russian
English to Spanish
Dutch to English
Dutch to French
French to English
French to German
French to Greek
French to Italian
French to Portuguese
French to Dutch
French to Spanish
German to English
German to French
Greek to English
Greek to French
Italian to English
Italian to French
Japanese to English
Korean to English
Portuguese to English
Portuguese to French
Russian to English
Spanish to English
Spanish to French
Machsupport Forum
Mach Discussion
VB and the development of wizards
How to run a script after each Gcode in single step mode
Pages:
1
2
»
Go Down
« previous
next »
Author
Topic: How to run a script after each Gcode in single step mode (Read 1161 times)
0 Members and 1 Guest are viewing this topic.
lfleiva
Active Member
Offline
Posts: 33
How to run a script after each Gcode in single step mode
«
on:
June 20, 2010, 05:24:35 PM »
Hi!
As title states I am trying to make Mach3 run a script after completing a G0 movement in single step mode.
The application is a turret press punch, I would like to have Mach3 run a punch macro each time it completes a G00 code. Then resume with the next G00 code after completion. My idea right now is to use single step mode, and somehow resume with a "Start" from within the macro.
Another thought is to detect movement completion from within the macropump. But not really sure how and which would be the implications when jogging or others.
Any ideas?
Thanks!
Luis
Logged
BR549
Active Member
Offline
Posts: 2,551
Re: How to run a script after each Gcode in single step mode
«
Reply #1 on:
June 20, 2010, 06:09:31 PM »
Not a good idea to have the macropump do motion control. It is dangerous. The macropump runs continuosly and can start machine movement ANY time the conditions are met. Wether you wanted it to or not AND there is no presice way to override/pause the macropump.
Every CNC punchpress I have seen controlled the punch through Gcode
Logged
Ya-Nvr-No
Active Member
Offline
Posts: 268
Scuptris 3D
Re: How to run a script after each Gcode in single step mode
«
Reply #2 on:
June 20, 2010, 06:43:55 PM »
Gcode or Ladder? Id never use Gcode to control a press. Seems too scary to me.
You would never pass an OSHA safety reg. Keep your phone handy to call 911.
No way to stop it in cycle and now days you have to have that feature on a PP
You might beable to write a brain function to emulate a timed double palm button safety interlock.
But no way to stop it once press is tripped. I dont think the brain is fast enough for that.
There are so many better and safer ways. Just be careful.
Logged
KTM
Active Member
Offline
Posts: 87
Re: How to run a script after each Gcode in single step mode
«
Reply #3 on:
June 21, 2010, 10:23:41 AM »
Punching machines run in single step mode after an M-Code ie: M25. After every line of code, the pate needs to be punched and then continue until another M-code ie: M22, which cancels punching. The macropump will have to look at the M25(set) and M22 (reset) conditions.
On the safety side, there is a light barrier which is connected in the emergency stop circuit around the punching area.
Logged
BR549
Active Member
Offline
Posts: 2,551
Re: How to run a script after each Gcode in single step mode
«
Reply #4 on:
June 21, 2010, 06:31:07 PM »
OK IF I follow you correctly
WHere the M25 is a macro that does the punch? YEP that is all ran from Gcode and you can single step it OR run in auto mode
G1 X1.000 Y1.000 F50
M25
X2.000 Y2.000
M25
X3.000 Y3.000
M25
Logged
lfleiva
Active Member
Offline
Posts: 33
Re: How to run a script after each Gcode in single step mode
«
Reply #5 on:
June 21, 2010, 07:05:58 PM »
Thanks for the replies.
I would understand this instead:
G1 X1.000 Y1.000 F50 % No punch
M25
X2.000 Y2.000 % PUNCH
X3.000 Y3.000 % PUNCH
M22
X0.000 Y0.000 % No punch
Regarding the macropump use it really wouldn't actually do motion control or press move with g.code, it will only send a signal to indicate it is time for a punch, and wait for an input signal to acknowledge its completion and then continue with the program.
Is there a way to catch a Gcode the same way M1030 does with M30??
Luis
Logged
BR549
Active Member
Offline
Posts: 2,551
Re: How to run a script after each Gcode in single step mode
«
Reply #6 on:
June 21, 2010, 07:34:13 PM »
I really dont see the difference. If you want it to punch just add the Mcode to make the punch cycle where you want it. Then everything acts like a NORMAL gcode operation. The further away from a normal Gcode process you get the harder it is to CAM
No way to catch the Gcode(;-) like you want.
This will do the same thing. AND IF you want to single step just turn on the single step.
G1 X1.000 Y1.000 F50 % No punch
X2.000 Y2.000 move
M25 PUNCH
X3.000 Y3.000 move
M25 PUNCH
X0.000 Y0.000 move
M30
%
OR for a different approach to the move/hold. This allows you to run in move/hold mode before punch OR turn on block delete and run auto mode.
G1 X1.000 Y1.000 F50
X2.000 Y2.000 move
/M1 Optional hold
M25 PUNCH
X3.000 Y3.000 move
/M1 Optional hold
M25 PUNCH
X0.000 Y0.000 move
M30
%
Logged
lfleiva
Active Member
Offline
Posts: 33
Re: How to run a script after each Gcode in single step mode
«
Reply #7 on:
June 22, 2010, 03:59:44 PM »
X2.000 Y2.000 move
M25 PUNCH
X3.000 Y3.000 move
M25 PUNCH
Is it possible to tell typical CAM software to write down a M25 (or whatever) after every G00 code ??
If not, this would be quite a pain to do manually.
Logged
BR549
Active Member
Offline
Posts: 2,551
Re: How to run a script after each Gcode in single step mode
«
Reply #8 on:
June 22, 2010, 05:44:22 PM »
SURE the CAM can handle it in the post with no problem.
SHEETCAM would work great for this as it is very capable in 2d work like punchpressing, plasma,laser,etc.
Just put drill points at the punch locations and let SC add a drill cycle at each point AND then MOD the post to output the M25 instead of the G81 drill cycle.
Les over at SC is great at supporting his users by helping with posts mods.
THEN it is very simple to convert a standard Cad drawing to a punch file(;-)
SheetCam, Never go to work without it. (;-)
«
Last Edit: June 22, 2010, 05:50:01 PM by BR549
»
Logged
lfleiva
Active Member
Offline
Posts: 33
Re: How to run a script after each Gcode in single step mode
«
Reply #9 on:
June 22, 2010, 06:24:40 PM »
Great tip,
Thanks!
Logged
Pages:
1
2
»
Go Up
« previous
next »
Jump to:
Please select a destination:
-----------------------------
Mach Discussion
-----------------------------
=> General Mach Discussion
=> Mach3 under Vista
=> Quantum
=> Mach SDK plugin questions and answers.
===> Finished Plugins for Download
=> VB and the development of wizards
=> Brains Development
=> Video P*r*o*b*i*n*g
=> Mach Screens
===> Screen designer tips and tutorials
===> Works in progress
===> Finished Screens
===> Flash Screens
===> JetCam screen designer
===> Machscreen Screen Designer
===> CVI MachStdMill (MSM)
=> Feature Requests
=> Non English Forums
===> Italian
===> French
===> Spanish
===> Chinese
===> German
===> Russian
===> Romanian
===> Japanese
===> Vietnamese
=> FAQs
-----------------------------
*****VIDEOS*****
-----------------------------
=> *****VIDEOS*****
-----------------------------
General CNC Chat
-----------------------------
=> Share Your GCode
=> Show"N"Tell ( What you have made with your CNC machine.)
=> Building or Buying a Wood routing table.. Beginnners guide..
=> Show"N"Tell ( Your Machines)
-----------------------------
G-Code, CAD, and CAM
-----------------------------
=> G-Code, CAD, and CAM discussions
=> LazyCam (Beta)
-----------------------------
Third party software and hardware support forums.
-----------------------------
=> LazyTurn
=> GearoticMotion Preliminary testing
=> Tempest Trajectory Planner
=> Contec
=> dspMC/IP Motion Controller
=> HiCON Motion Controller
=> Third party software and hardware support forums.
=> Galil
=> Newfangled Solutions Wizards
=> Mach3 and G-Rex
=> Mesa
=> Modbus
=> NC Pod
=> PoKeys
=> SmoothStepper USB
=> Sieg Machines
=> Promote and discuss your product
-----------------------------
Tangent Corner
-----------------------------
=> Tangent Corner
=> Competitions
=> Polls
=> Bargain Basement
-----------------------------
Support
-----------------------------
=> Downloads
===> XML files
===> Post Processors
===> Macros
===> Tutorials
===> Others
===> Beta Brains
===> Screen Sets
===> Documents
===> MACH TOOL BOX
=> One on one phone support.
=> Forum suggestions and report forum problems.
-----------------------------
Mach4
-----------------------------
=> Mach4 pre-Alpha Testing
Loading...