I have a spreadsheet containing rows of text (with this text info being derived from from User Input cells). Ultimately these rows are used by CNC Coil Winding machine - it works fairly well, exept now I want to get slick....for example of the last few winds, I want the machine to slow down so excess Epoxy can be wiped off as it rotates.
Obviously, to establish when the coil winder should slow down in speed, I need to know the total winding count & then subtract a few winds off - using this latter figure to commence the slowing down. I don't want to bog you down with what Coil Winding code looks like, but here's a high level generaic flavour...
Row 1 - "Quickly Wind 10 turns & while doing so move the copper wire left to right to position X (first layer of winds)
Row 2 - "Quickly Wind another 10 turns, but move the wire back to start position y (next layer of winds)
Row 3 - "Slowly Wind 10 turns & while doing so move the copper wire left to right to position Z (third final layer of winds)
& so on. Therefore, in this case, each row of Excel's 'output' equals one 'layer' of a coil winding.
Ok, that's the background (not that it's particularly relevant), so I'll try & keep this generic & not bogged down with coil winding detail!
So, an example - let’s say I have four Excel ‘cell’ values (all derived from User input)
Cell A1= 11
Cell A2 = 2
Cell A3 = 3
Cell A4 = 4
The first two cells can tell me how many 'normal speed' rows of CNC winder output code I need (remember, each Excel row represents a coil winding layer) – by dividing cell A2 into A1 …this comes out a five (with one left over). Therefore 5 'full' winding layers, with the last layer being the 'remainder (not a full layer...so this last row tells me we're near the end of the winding count)
I want to use that simple calculation above with an Excel Macro creating rows of text, repeating over & over – until the ‘remainder line’ is met (when ultimately the coil winder must be told to slow down)
So in my above example, the Macro should create 5 successive rows of text (for the normal speed aspect of the coil winder)…..
1st Row of Text’ with value of cell A3*1 pasted at the end
2nd Row of Text with value of cell A3*2 pasted at the end
3rd Row of Text with value of cell A3*3 pasted at the end
4th Row of Text with value of cell A3*4 pasted at the end
5th Row of Text with value of cell A3*5 pasted at the end
With the final following row of text being different (ie the ‘remainder’ from the top calculation)
6th Row (ie the remainder) of Text with value of cell A4 pasted at the end
I'm new to Excel (though not programming - I have some basic PIC programming experience).
Do you have any idea how I can do this?!!! (or at least get me started – I googled, but my brain spontaneously combusted at the amount of permutations)
Bookmarks