Hello Guest it is April 20, 2024, 06:45:09 AM

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 - jimpinder

1091
General Mach Discussion / Re: Macros, Visual Basic and all that
« on: September 23, 2007, 06:54:55 AM »
Speaking for my Dad :- Whoops!!!!! It was an eroor with while and wend...... I have now fixed it working okay...

1092
General Mach Discussion / Re: Macros, Visual Basic and all that
« on: September 23, 2007, 05:39:01 AM »
No !! I am not having much sucess. I appear to have written it as has been suggested, in fact I think I have tried just about every combination, without success.

As soon as I start stepping through it, I get syntax error - usually with one of the "Sub" words highlighted.
Do subs need to be declared, as in some PIC chip syntax ???


I have attached my script, if anyone would mind having a look at it. Basically it turns a handrail stanchion from a piece of 10 mm bar (or any start diameter) - the inputs are from DRO on a page of Mach3 Turn I have ammended.

The maths might be a bit out, ( I don't think so, but until I get the syntax right, I can't check it.)

Jim Pinder

Any replies could come direct to jimpinder@tiscali.co.uk







1093
General Mach Discussion / Re: Macros, Visual Basic and all that
« on: September 23, 2007, 05:20:07 AM »
Thanks Gentlemen - I'll work on that !!!

Jim Pinder

1094
General Mach Discussion / Re: Macros, Visual Basic and all that
« on: September 22, 2007, 04:00:19 PM »
Thanks Scott - I'll have alook at that.

I think I went down the Visual Basic route because I have done a bit of computer programming in the past - and thats how I think.


One more question - to anybody - how do you name a subroutine is Vis Basic - and then call it.

It seems to be happy when I use CALL to call it, but I cannot work out how to name it.

1095
General Mach Discussion / Re: Macros, Visual Basic and all that
« on: September 22, 2007, 05:28:17 AM »
Yes !! Just tried it with a "Quick brown fox" writing and printing - that does the trick.

Thanks Stirling.

1096
General Mach Discussion / Re: Macros, Visual Basic and all that
« on: September 22, 2007, 05:16:09 AM »
Thanks for that, Stirling - I did try that, but it seemed as though I didn't get any output at all to the file.

I will try again, and come back.

1097
General Mach Discussion / Macros, Visual Basic and all that
« on: September 21, 2007, 11:55:57 AM »
Can somebody help me -
My machine is working fine. I am competant enough to write GCode to run it.
I have started to write Macros in Visual Basic - eg rough a bar down to a finished radius - putting in the start and finish radius in User DRO's, but the trouble with Macros is when you put them into Mach3 as, say , M204 or whatever, you cannot see the result on the toolpath generator - so it is a bit of pot luck when you run it.

What I wish to do is write my Visual Basic script, then have it output a file to a GCode file for Mach 3. When I pick up the GCode file in Mach 3 it will show me the tool path and I can go through all the checks before I run it.

I have the Vis Basic scripter writing to a file,  using "Open....etc"    Write#1 "etc etc" but Vis Basic also writes the inverted comas into the GCode, which Mach3 will not accept. What is the format to get Visual Basic writing to a file that is acceptable to Mach3, please !!!

1098
General Mach Discussion / Re: Problem setting up an xy table onto a Lathe
« on: September 17, 2007, 11:18:08 AM »
I wish my lathe was that accurate !!!

1099
With reference to your controlling speed with Mach 3 -
I was trying to look through your Mitsubishi guide, but found it very difficult.

What external inputs will the Mitsubishi take, to control speed. - I found one bit that was very like my Omron inverter, which, unfortunately cannot be controlled directly by Mach 3.  My Omron requires external switches for M3 M4 M5 - which I have rigged up with external relays driven by Mach3, but the speed control is by an external potentiometer connected to three terminals on the Omron - and is designed more for a speed control at the machine, rather than a computer controlled environment.

I have the inverter right next to the computer anyway, and can change speeds on the fly if I wish, so it is no great problem. In future I will fit an external potentiometer, driven by a servo - that Mach 3 can do.

There is another system on the Omron, where you can pre select four speeds, and select these by a signal on two wires. Mach 3 could do this very easily by a small Macro. I haven't tried this yet, because, quite frankly, I find with the Omron next to the computer, I can change to the speed I want without effort. - Although it might be different if I wanted to go away and do something else while the machine was working.

1100
General Mach Discussion / Re: mach3 repeat info
« on: September 16, 2007, 05:47:45 AM »
Yes - you can repeat the same program with different offsets.

Have a look at the tutorial on offsets and experiment a bit.

The other way is to have your cutting program as a sub routine, and set different start co-ordinates then call the sub routine.