Machsupport Forum
General CNC Chat => Share Your GCode => Topic started by: Jack Hoffa on February 04, 2013, 04:52:23 PM
-
Here is my simple G code for a tying machine-M3, M7 and M8 run solenoids.
X and Y are servos for a wire feed and a wire twister -
The cycle takes about 3.5 Seconds - I need to run in 2.25 Seconds and most of the time seems to be in the execution between comands and not the servo speeds.
Anyone's help would be worth some money
Thanks
Jack Hoffa 714-990-5980 (cell 714-404-7159)
jack.darlene.hoffa@roadrunner.com
M3
G91G0X19
M8
G0X-13
G0Y.6
M7
M9M5
G0Y2.4
M30
-
Jack,
You might try the M10/P* / M11P* (off/on) commands. They don't have a time delay associated with them as M3 (other Ms?) do.
I don't know if you can use more than one output though, but you might try replacing the M3 first to see if it helps. I also haven't tried, but maybe also use E10/E11 commands for another output. If I am wrong, someone will hopefully jump in with corrections/another suggestion.
Regards,
John Champlain
-
Hi Jack,
It is as John has said - these commands are indeed faster but the M11P*/ M10P* command set execute in a different way and are perhaps primarily intended for laser switching.
The M3/M7/M8 are ‘stand alone’ commands (they will execute when called).
The M11P1 (turn on Output #1), M11P2 (turn on Output #2) etc. are ‘linked’ commands (they will only execute after an axis has started it’s movement).
So it may be possible to increase speed by using these commands but it would depend on the design of your machine and the speed of the solenoid operation etc. etc.
Tweakie.
-
::)
Thanks you guys
This is very important to us
Where do I find out about these commands, and how they work?
I am using a smooth stepper, so could use a second Breakout board I think
Any help on this would be greatly appreciated
Jack Hoffa
jack.darlene.hoffa@roadrunner.com
-
John What are E10/E11 commands
Jack
-
Jack,
I haven't used them, but same as M10/M11 commands as far as I know. Tweakie does use them. Both M10P*/M11P* and E10P*/E11P* are not well documented, and only work properly in later versions (post Ver. 057 ?) of Mach3.
To get M11 (or others) to work, enable an output (ex. Output1) and assign it to an output pin. Then issue the command for Output1 On (M11P1) followed immediately by a G0 or G1 command, either on the same line or the next. The G0/G1 command can be either a needed axis move or a dummy axis move (such as G1 C0). The output1 pin will turn on immediately when the axis move begins. Repeat to turn it off with the M10P1 command.
John
-
Thanks John
It sounds a little (more than a little) tricky, but I will be trying very hard tomorrow.
I think I have the latest version of Mach3
Tweakie - could you lend a hand with your expertise
It is very important and could lead to many Mach3 comercial units
waiting - but very excited
Jack
-
Hi Jack,
I think John has described the operation of these commands perfectly and I can only repeat what he has already said.
The M and E commands perform exactly the same function (M10P1 = E1P0 and M11P1 = E1P1) so to avoid confusion I will just stick with the M commands.
A typical GCode sequence could be something like this;
G0 B0 (zero imaginary Axis B)
M11P1
G0 B1 (Output #1 switched on at this point)
M11P2
G0 B0 (Outputs #2 switched on at this point)
M10 P1
G0 B1 (Output #1 switched off at this point)
M10 P2
G0 B0 (Output #2 switched off at this point)
Etc.
There has to be an axis movement following the M10 / M11 command in order for it to execute and I often use an ‘imaginary’ axis B which has been configured at minimal steps per unit with maximum Velocity and Acceleration if there is no ‘real’ axis movement to follow the M command (this may sound a bit strange but some software (such as DotG) requires a trigger point whilst the X,Y & Z axes are all stationary).
Execution time differences, measured some while ago, was 100mS for the M3 command and 2mS for the M11P1 command so there could be some advantage for your application and the best bet would be to just try it and see if you can achieve any improved results.
Tweakie.
-
Thank you both soo much for your help
I'm off to try this
Jack
-
Good fortune Jack - I hope it works for you. ;)
Do please let us know how it went.
Tweakie.
-
Hi
One more help needed
I want to set up the 2nd Parallel port, can't find any instructions - INput setup etc
I have win 7 with a smoothstepper
Are there any other commands to fire solenoids beside the M commands?
You guys are so helpful to a mechanical guy, who has to learn the logic and electronics
thanks so much
I have been running Mach3 for full size mill and lathe for many years
Jack
-
Are there any other commands to fire solenoids beside the M commands?
Other possible methods include VB (Cypress Enable) and as an example of the VB;
ActivateSignal(OUTPUT5)
DeActivateSignal(OUTPUT5)
This cannot be included directly within a GCode program but GCode can be included within a VB script although, as a general rule, mixing GCode with VB often leads to disaster.
I know nothing about Win 7 so cannot be of any help there but I am sure there are others who can.
Tweakie.
-
Jack it is possible that the SS does not support the M10/11 convention. But as to non delayed action you have 3 choices to test.
M10/11
EPO/EP1
Use the Dir output from a phantom axis.
USe of CB code ? You are already doing that with an M8 call and there IS a delay.
FOr such a simple machine WHY did you choose the SS over the LPT version? Just curious
(;-) TP
-
What is LPT?
We will sell a laptop with every machine so Win 7 now and win8 soon
Thanks so much
Jack
-
oK I see The reason, you want to use a laptop.
LPT is the parallel port version it does NOT use an outside motion controller board. It runs straight off the PC.
(;-) TP
-
Yes all my garage stuff is XP will parallel ports.
This smoothstepper is all new stuff to me.
Thanks Jack
-
Hi
I tried the M11P1 and E1P0 commands in every way I could think of-No luck
I guess thr SS doesn't recognize it - Bo Ho
Can you help me with the Dir output from a Phantom axis - I could use A,B and C
Thanks again
Jack
-
Jack,
Enable the A axis and assign pins to it. Set the velocity and acceleration to maximum values. Connect a solenoid control to the A axis direction pin. In your gcode, a G0 A-.0001 should trigger the solenoid. A G0 A0 should turn off the solenoid. If the solenoid works backwards to what you want, then reverse the Dir LowActive setting.
Do the same for the B and C axes.
Regards,
John Champlain
-
Thanks again so much John
I will Try tomorrow
I will dig up the U-tube for our beta test last week
Jack
-
Here is a U-Tube of our Beta test 2 weeks ago
http://www.youtube.com/watch?v=pOxHKxZAZYQ
Jack
-
WoW - The fake motor drives A,B and C really worked!!!!!
I am so excited.
Thanks soo much John and Tweakie
You guys are the greatest
It took a lot of playing around
They only worked when the fake drives were using G90,
I use G91 for my program and they wouldn't work
so I changed back and forth
The time improved from 2.9 sec to 1.6 sec which is GREAT!!-way more than I expected
If you would Email me your addresses I Will send a little something
jack.darlene.hoffa@roadrunner.com
Thanks again
Jack
:)
-
Jack,
Glad you got it working. Your success is enough reward. Please post another video showing improvement if possible and not too much trouble.
Best Regards,
John
-
:) Thanks Fellas, that is a neat machine too Jack.
Brett
-
I will get some more videos out next week
Hopefully some in slow mode to see its function
I have a patent # 8281712 Got it in 3 months - pays to be older than 75
Thanks again everyone
Jack
-
Hi
I tried the M11P1 and E1P0 commands in every way I could think of-No luck
I guess thr SS doesn't recognize it - Bo Ho
Can you help me with the Dir output from a Phantom axis - I could use A,B and C
Thanks again
Jack
Hi Jack,
Download the latest SS plugin. Support for M11P/M10P has been added.
Dan
-
Thanks Dan
Sounds great
Jack
-
http://www.youtube.com/watch?v=OvsEDX48Pjc
Here is a video of our second Beta site
You can see why it needed speeded up
I will get a video of the faster version soon
Our goal was to get it to 2.25 sec, it is now running at 1.5 sec with safe motor accel and speeds.
Thanks again everyone
Jack
-
Thanks Jack,
The many ways in which Mach3 can be (is) used never ceases to amaze me. :)
John Champlain