Hello Guest it is March 29, 2024, 07:48:13 AM

Author Topic: Newbie - having trouble with simple scripts  (Read 3696 times)

0 Members and 1 Guest are viewing this topic.

Newbie - having trouble with simple scripts
« on: May 27, 2011, 04:19:33 PM »
I'm very new to all of this. I just started using a 3-axis router with ATC and am trying to add some buttons to simplify the basic control of the machine. I added buttons on the offset page to run the g-codes for each tool change, so I don't have to type it in anymore - that was simple and worked like a charm. Now I'm trying to take it a step further add lines to lift the dust hood and move to the spot I touch off tools so I don't have to mess with that either - but it doesn't run as g-code, and then I changed it to a vb script it ran it backwards - I even rewrote it backwards but it still did the same thing - I figure it's something simple I don't know about, the lines I'm trying to run are:

M6T1
M08
G0 G53 X1 Y1

andrewm

*
Re: Newbie - having trouble with simple scripts
« Reply #1 on: May 27, 2011, 04:51:36 PM »
If your trying to run that as VB then you need to use Code "" that lets VB know you want it run as Gcode.

Code "M6T1"
While IsMoving()
Wend
Code "M08"
While IsMoving()
Wend
Code "G0G53X1Y1"
While IsMoving()
Wend


Hope that helps
« Last Edit: May 27, 2011, 04:59:41 PM by AndrewM »
Re: Newbie - having trouble with simple scripts
« Reply #2 on: May 27, 2011, 05:18:17 PM »
Thanks. I tried it and it's an improvement but it didn't complete the tool change before it made the g0 move back to the front of the table (the tool changer is at the rear, 4x8 machine). It's like it made the first move of the tool change script, than the g0 move in the button script, then continued with the rest of the tool change moves (from the front of the table no where near the tools).

Offline ger21

*
  • *
  •  6,295 6,295
    • View Profile
    • The CNC Woodworker
Re: Newbie - having trouble with simple scripts
« Reply #3 on: May 27, 2011, 06:07:12 PM »
Sounds like the problem is in your M6Start macro.

You may need some While-is moving commands in there.
Gerry

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

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html
Re: Newbie - having trouble with simple scripts
« Reply #4 on: May 27, 2011, 06:23:29 PM »
Here's my M6 files, the tool change works, or at least I've never had a problem with it while running g-code. I can understand some of what I see when I open it up but most of it make little to no sense.