Hello Guest it is October 04, 2023, 10:39:22 PM

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - rhtuttle

Thomas, thank you so much for taking time to look at this.  I haven't done any Mach scripting in a couple of years and had been banging my head against a wall for a few hours when I posted.

Contrary to TP's opinion I do RTFM but the programmers reference manual only has this:

Sub SystemWaitFor(Signal As Integer)
This function it is used to tell Mach that a macro script is ending, and that any further
GCode execution should wait for the Signal to go active. If used, this function should
always be the last line in a macro and it should never be used within a loop.
SignalID must be one of the pre-defined Mach3 CB output signal constants (see
CB Constants), or other value or expression that evaluates to one of those values.
Return Value:
See also:

Since the manual does not contain the CB Constants it refers to I assumed, wrongly, that Poppa bear's use of ReStart was a constant.  After leaving it alone for a few hours I reread his example.  I missed a line of code:

ReStart = IsActive(INPUT4)            'this is input signal 4

I like your code, thanks again

Hi Tom, thanks for taking a moment to look at the code.

I too would like 'resadble code'  :D as you suggest.

Let me see if I can explain.

the lines: code "(...)" output a message in the Status box.  I use it to remind me what each step is before I continue.  Tool change or jog primarily.

as for the combination before and after those lines they are supposed to pause and restart the execution of the macro see Poppa Bear;s response here:


I just converted my bench lathe to CNC and do not as of yet have spindle control so a couple of those code entries remind to start/stop the spindle.
This is just the first part of code to turn a part.

VB and the development of wizards / Mach3 turn macro - Pause restart
« on: March 10, 2015, 02:04:38 PM »
Good afternoon all,

When I run this in Mach3 turn VB editor it executes but does not pause for any of the restarts.  When I run from the MDI line a message "Pause in Macro/Script". If run in a gcode fiilewith just one line M401 (the macro file) I get the same message.

Can someone tell me why this doesn't run in Mach 3 turn?

Sub main
'Domed Winding check
'0.5614 fixture diameter
'0.2804 fixture radius
'0.725 Raw NickelBlank Dia
code "(Mount back cut tool)"
Code "(Jog to Fixture surface)"
' Set Z to Fixture Radius
code "(Mount Front Cut Tool, position to back edge of mounted nickel)"
' set spindle speed to 400
Code "(Turn Spindle on to 400RPM)"
code "m3 S400"
code "g01 f2 x0.285"
code "g0 x0.3625"
code "M5"
code "(stop spindle)"
End Sub


Mach4 General Discussion / Re: GSim Mach4 Material Removal Simulator
« on: January 30, 2015, 10:49:06 AM »
GSim messageBox now reads: SetPixelFormat failed for subtraction

Finished Plugins for Download / Re: Huanyang VFD controller plugin
« on: May 04, 2011, 10:57:04 AM »
Okay, seller is going to send the chips and I will get someone competant to solder in place. 
Next questions.

What gauge wire is everyone using from the VFD to the spindle, 12 or 14 stranded? 

Shielded, correct?

What method is best for the connections at the spindle? 



Finished Plugins for Download / Re: Huanyang VFD controller plugin
« on: May 02, 2011, 01:20:41 PM »
Majorstrain, thanks for posting the pictures.  I just got my cheap VFD today and even though I know nothing about electronics I was able to tell that my 485 chip is missing from all of the info posted here.

would this chip work?

There is nothing in the CN4 holes.  What is supposed to be there?  Do I need it?

PC1 and PC2 have nothing soldered to them.  Is there supposed to be something there?  Do I need them



Finished Plugins for Download / Re: Huanyang VFD controller plugin
« on: April 26, 2011, 05:44:02 PM »
I ordered one of these last week.  First off, let me say that I am electronically challenged.  The Ebay site said that the VFD was modbus compliant.  Does anyone know if they have fixed this or if they just mean that you can communicate over the RS45? 

It sounds as if these are pretty hastily put together and I might be spending a lot of time seeking help.  I have read most of this thread and some of the other ones on cheap chinese spindles but it is all I can justify spending on an already too expensive hobby.

Hope I don't have to bug you guys too much.

General Mach Discussion / Re: 4th axis setup cheat sheet
« on: January 11, 2011, 06:21:44 PM »
Trying to get my head wrapped around this subject (pun intended) and I understand the steps/degree.  If I have a 60:1 gear ratio and a 10 micro step on a 1.8 degree stepper that would be 333.333333 / degree.  Now, what is a reasonable velocity to enter?  With that gearing, if I wanted to limit my stepper RPMs to 500 ( at this velocity there would be no load so no torque problems ), I would get 8.333 revs/min so I would enter a velocity of 3000.  Is that the way to calculate it?



General Mach Discussion / Re: 4th axis - GCode degrees vs distance
« on: March 09, 2010, 02:09:03 PM »
Thanks to all that have responded.  Now I am more throughly confused than ever ;)

PointCloud,  'Why would you want do do that!!!'  Probably because I don't know what I am doing.

Query.  I have a tube that I wish to do the following.  Put a logo on with a diamond drag point that was drawn with a Vectric product and assumes a linear relationship.  I want the logo to remain proportional regardless of the tube size. Then continue with adding a geometric design (e.g. greek key) to the circumference which is defined in radial terms so that regardless of size there are always the same number of repititions on the circumference.

It seems as though I will have to change profiles to accomplish this kind of task and I have no problem with that.  I just was trying to find out what the limitations are in Mach.  Love the program.  Love the help you guys give.  Hopefully I will have my A-axis put togehter in the next few months and then I will have a whole slew of new questions for  everyone.



General Mach Discussion / Re: 4th axis - GCode degrees vs distance
« on: March 02, 2010, 02:44:09 PM »
Thanks for the reply.  I do use separate profiles, but to my knowledge there is no way of changing them without having to shut mach down and reload.  Which means that you have to re-reference.

I have an app that generates the code, loads it into Mach and runs it using the Mach interfaces available.  If it is possible to switch from angular to linear programmatically then I would prefer to do that when possible.