Hello, Scott
Maybe I din’t explain me well. Sure than we need some macros for do it all job, programming is not my strong part.
But forgot to explain some things
Actually I am using X, y and Z axis, but our idea is CNC control of X and Y axis and for wheel than moves needle, use an AC or DC motor, than turns continuously.
Then locate a disc and optical sensor in wheel, having two slots, one for initial position (needle up) and other for hoop movement beginning of movement (locate in position where needle is coming outside fabric at 2-3mm height.
First slot is used when I reference axis to cero position (hoop is in 0, 0 position) centered with needle, and needle is in upper position.
Second slot via optical sensor send a signal to controller, when needle is coming out of fabric, and X and Y axis, move a hoop one line to next embroider work position and stopped. In Mach is an button (Single BLK), than permits to operate line by line, if I can push this sensor with a optical sensor signal, then we can control than hoop movement is only when needle is out of fabric.
I don’t know how connect this sensors to controller, and how get that signals from sensor, will be converted in commands to Mach3, to move x and Y axis, line by line.
One time that we can get this, must be makes some trial and error, in needle motor velocity, accord X and Y max velocity and considering a max travel, to guarantee than X and Y axis line movement finish before, needle is coming inside fabric again. This trial gives us real Stitches per minute of this embroidery machine, than is direct relationship with max hoop velocity.
Some example calculus.
If X and Y max velocity is 3600 mm/min, then means is 60mm/second.
If selected max embroidery distance between stitches is 5 mm, then we need 0.083 seconds (83 milliseconds) for max travel at this speed.
Needle movement works in this way.
50% of travel is above sewing/embroidery machine table and 50% is under table, we should consider some security height (like milling), of 5% before coming inside fabric, and when is coming outside fabric, theoretically will be 60% of needle movement is in security zone (where is not possible hoop movement), and 40% of difference time is where we can move hoop, because needle is out of fabric.
Then if 40% of time needed for one needle movement is when we can move hoop, these 83 milliseconds than we need to move hoop in max travel is 40% of time to make one wheel rotation.
If wheel motor can rotate at 300 RPM, we can get this easily because, If motor RPM= 300, then is 5 revolutions x second = 1 revolution in 200milliseconds. If hoop movement for 5mm is in 83 milliseconds , and 1revolution is in 200 milliseconds, then 40% of this time is than we need to move hoop, 200*40% = 80 milliseconds. In any superior speed, works can do it easily. If hoop movements speed is greater, we can increase RPM’S and vice versa.
For jump movements (when hoop travel a long distance moving from first embroider object to next in sequence, we can selected a max travel too without stitches (for example 15mm), and reduce at half motor velocity, this complicate a lot project, because I think than we will need a PWM, to control motor speed in G CODE.
Thanks in advance for your attention and answer.
Regards
Rene