![]() | |
| Home Page | Mark Forums Read | Today's Posts | My Replies | Classifieds | Reviews | Photo Gallery | Web Links | Share Files | Advertise With Us | Ad List |
| |||||||
| This forum is sponsored by: |
![]() |
| | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
| |||
| |||
Just an FYI for the archives. I just finished writing an M Code macro and was reminded of lessons learned using another CNC software program. I could step through my macro using VB editor no problem. Could run the macro in VB editor not quite as well, and using the compiled M Code in G Code went all to hell. Embedding M Code inside M Code has one effect. Writing longhand logic of the same process inside an M Code has another. When Mach lookahead is set above a threshold, sometimes the program just blows by logic statements or the programatic sequence plays out funny. Not ha-ha funny though. I wanted to call a tool (Txx) and have the offsets update (Hxx, Dxx) and then getoemdro to use the values in a G01 statement. To update the DROs I first used M6 but that left a flashing ToolChg led on the screen. I replaced the sequence M06 T20 G43 H20 D20 with T20 tool = GetSelectedTool() SetCurrentTool( tool ) G43 H20 D20 to avoid the flashing led. The tool call had no effect when positioned on the fourth or fifth line similar to the placement one might expect in a Gcode file. Moving the first three lines of the logic snipet to the top of the file did work since I'm assuming was the first logic read. |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Asta-Rakentaja event in Tampere, Finland 15/17 of Feb | an-cadsolutions | Trade Shows and Events | 0 | 02-10-2008 08:51 AM |
| Looking for an event | Mick Jagger | Trade Shows and Events | 7 | 03-13-2007 05:14 PM |
| VB 'Event Sequencer- Help me! | vacpress | Visual Basic | 2 | 06-12-2006 02:23 PM |
| Macros | cncfreak | General CAM Discussion | 24 | 05-06-2005 06:04 PM |
| macros | toyoda | General CAM Discussion | 0 | 05-30-2004 05:56 AM |