Hello Guest it is March 28, 2024, 07:09:49 PM

Author Topic: How start to run an Embroidery Mach profile  (Read 12069 times)

0 Members and 1 Guest are viewing this topic.

How start to run an Embroidery Mach profile
« on: June 30, 2010, 10:45:47 PM »
Hi,

I need initializate my embroidery profile using Single Blk mode

I will use and X,Y,Z axis, and swap Z with spindle.

I will make a Macro (M910.m1s) and place in Initialization String.

M910.m1s
DoOemButton(1004)  'Pressing button Single Blk


I need start spindle using Cycle Start buttom,
but I need change default function of this button
and use a VBscript .
I saw in Mach2 Customization than I can change default
Funtion for Cycle Start Button and use a VB Macro. Macro could be M900.m1s

M900.m1s
SwapAxis(3,6)  'Swap pins of Z axis for Spindle pins
SetSpinSpeed(S100)  'sET spindle Speed in 100RPM
DoSpinCW( )     'Start Spindle at 100RPM Speed

Then spindle start,

Cycle Start button will be pressed in each spindle revolution
using a optoswitch connected to one Input Pin, configured like
OEM trigger1, and assig OEM code to OemTrigger in System Hotkeys.

Each spindle revolution will press Cycle Start once, and run
one Gcode Line for X and Y movements. Like I will be in
Single BLK mode, I don't need to use Cycle Star Buttom.

Also I need to create another VB screen button for
stop spindle and pause system.

May work in this way?

New problem will be, how many revolutions will be possible to get
considering Mach response 1/10 second and Optoswich start and Stop
I think more and less 6-7 times/second for a 400 RPM. IT depends
also of lenght of X and Y movements.


Thanks for your help.

Regards

Rene

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: How start to run an Embroidery Mach profile
« Reply #1 on: July 01, 2010, 10:12:18 AM »
less than 1/sec
Re: How start to run an Embroidery Mach profile
« Reply #2 on: July 01, 2010, 10:40:14 AM »
Hi BR549... I don't understand your answer,, please explain..

I have another doubt.

 What is best place to connect stepper motor for spindle work?
In controller are free Z and A axis,

I was thinking that really I don't need swapaxis (Z, spindle)

If my set up is using only spindle, and I need homing spindle
is possible change properties of Home Z button, and
use a VB script for homing at low speed until optoswitch for home limit
will be triggered.

It's possible??
 

Thanks in advance

Rene

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: How start to run an Embroidery Mach profile
« Reply #3 on: July 01, 2010, 11:59:39 AM »
You will not have enough time to complete all that you want to do inside of each VB I/O read SO mach will stretch the I/O read cycle and that could end up as SECs per read OR mach will skip over VB calls.

ALSO it is a Bad idea to control MOTION code from the Macropump.  NOT always safe.

VB code in mach is NOT realiable enought to do what you want to do. You need to do it as a plugin in. THEN maybe you can make it work.
Re: How start to run an Embroidery Mach profile
« Reply #4 on: July 03, 2010, 12:59:10 PM »
Hi, BRP 549, Thanks for your answers.

I think that Mach can't skip over VB calls, because I will work in single blk mode, then in each motor revolution will be only one VB call
for Cycle Start and run only one Gcode Line for X and Y axis movement.PLS correct me if I am wrong.

Yo're right about that VB I/O operation  could be very slow. (I should verify how slow)
but I have the option of reduce speed of motor until I can  put inside one motor
revolution all procces (external input +oem code and + x,y axis movement)
(I will use 48 deg/rev stepper motor and my set up will be 7.64step/mm)
 
Initially I need to test system and know what time I need for optical switch activation
what time it needs for send OEM TRIGGER code 1000  to controller for
and what time takes to controller send pulses for  axis move 1mm one axis.
In this way I will kow how many stitches I can do.

If finally all proccess take 1 sec for stitch , the final SPM will we 60.

Do you know if are another way to run code line by line using an external input?


Thanks for your answer, I hope you can continuing help me.

Rene

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: How start to run an Embroidery Mach profile
« Reply #5 on: July 03, 2010, 04:52:52 PM »
RENE it may run as slow as several secs per stitch.

I have said all along that it probably will not work.

There is no way to do what you want from Mach as it is .

Maybe from a plug in where you have direct access to the engine and fast I/O

You best bet is going to be to set up the spindle with a large FAST servo and let Gcode run the show. There IS a reason why embroidery machines run proprietary hardware/software.
« Last Edit: July 03, 2010, 05:00:10 PM by BR549 »
Re: How start to run an Embroidery Mach profile
« Reply #6 on: July 03, 2010, 10:09:59 PM »
OK, then is preferable stay using first G code generated by Khalid software..

May you remember it

G00 Z 0.8---------------Needle motor turn 80% of rev (needle come inside fabric stitich and going out)
M786--------------------Macro (GetOemDro(802.0) Zeroing Z AXIS
G00  X 1.5 Y 2.5  Z 0.4-----Hoop movement and Z axis complete revolution and turn 20 % of next (needle is 3mm above fabric before stitching)
G00 Z0.4---------------Needle motor turn 40% of rev (needle stitch fabric and going  out and stop 3mm above fabric)
M786
G00 X 2.5 Y3.5 Z0.4

In this way is not synchronism, but is possible to do 150-200 Stitches per minute,, (tested).
there  arn't VB I/O only pure and simple GCODE

Thanks for all your help and patience

Regards

Rene

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: How start to run an Embroidery Mach profile
« Reply #7 on: July 03, 2010, 11:00:29 PM »
OK what is the Mcode(M786) for that will slow down the code. I don't remember the Mcode in  Khalid's gcode file.

Offline khalid

*
  •  213 213
    • View Profile
    • My Wood carving
Re: How start to run an Embroidery Mach profile
« Reply #8 on: July 04, 2010, 03:25:02 AM »
M786 just Zeroing the Z-axis DRO (Further explanation will be done by RENE)... You can play with Free software at the following download links at CNCzone....Just download free DST files from internet ..Open in my software and it will generate the Gcode...You can then help Rene...

We can improve this software with all of your help...RENE has tested the Gcode with 200stitchs per minute and the results are promising..Unfortunately i am busy in some other projects so didn't working on my embroidery machine and this software...

http://www.cnczone.com/forums/showthread.php?t=57404&page=33

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: How start to run an Embroidery Mach profile
« Reply #9 on: July 04, 2010, 11:18:54 AM »
OK lets go over the GCODE :

from THE NEEDLE UP POSITION  A0.000 you can move the XYA untill you get to just above the fabric(say A90.000) then you must stop A while the needle cycles thru the fabric and back to a needle clear point (say A270.000). Then you can do XYA moves until the A reaches A90.000 again.

Is that correct so far ?