Absolute Scripting engine

We have two scripting engines built into the software.

The first one is the Standard Scripting Engine which has a GUI interface and allows you to build up a script by adding single commands.
Each command is sent one after the other to the controller and allows all different winding patterns to be created.
The downside for certain winding patterns that use a lot of small movements such as LVDT is that the small delay due to the USB ports latency between commands.

Because of the above we decided to develop the Absolute Scripting Engine and added a flash memory chip to the controller.
This allows lot of small or big commands to be added and downloaded to the flash memory before the script is executed and does away with any delays.

Format

Unlike the Standard Scripting Engine which is Incremental positioning for each command, this is absolute positioning on each command.
For example if you set the bobbin position to be 10.00 and feeder position to be 5.00 in a command (10.00,5.00,100,) then it will rotate the bobbin 10 times and move the feeder by 5mm.
If you then send a command (11.00,6.00,100,) it will move the bobbin by 1 turn and the feeder by 1mm, at a speed of 100 RPM.
Note that all commands are interpolated. In other words both the Bobbin motor and Feeder motor will start and stop at the exact time.
So if you had a command of (10.00,10.00,100) then for every turn of the Bobbin Motor then the Feeder will move 1.0mm.

The format for each command is: Bobbin position, Feeder position, Speed, Comment
If the bobbin, feeder and speed are set to zero (0,0,0,Paused) then the script will pause and display the comment.
You will need to create your own ramping if required as shown in the example screenshot above that increase the speed gradually at the start of the script and decrease at the end.

A simple example is
Move bobbin to 100 turns(100 winds), move feeder to 50mm(50mm move). At a speed of 100RPM
100.00,50.000,100,Comment can be inserted here

Move bobbin to 102 turns(2 winds), move feeder to 55mm(5mm move). At a speed of 100RPM
102.00,55.000,100,

If you wanted to pause then you would insert the command
0,0,0,

Next if you then wanted to add a command to move just the feeder you would leave the Bobbin Position the same as the previous command before the pause.
Leave bobbin at 102 turns(0 winds), move feeder to 65mm(10mm move). At a speed of 50RPM
102.00,65.000,50,

If you then wanted to add a command to move just the bobbin you would leave the Feeder Position the same as the previous command before the pause.
Move bobbin to 112 turns(12 winds), leave feeder at 55mm(0mm move). At a speed of 50RPM
112.00,55.000,50,

As you can see it is a very simple format, but works well and fast.
The scripts can be created in Excel spreadsheet and saved as a CSV file. This can then be loaded into the script window and ran.
Using Excel allows people to use formulas to create all kinds if winding patterns and very useful for variable pitch across a core.

Ramping

For high speed winding, the motors will need to have there start and finish speed gradually ramped up and down. This stops any jerky movements on the wire and gives a smoother result.
With the Standard Scripting Engine it will automatically use the controllers built in ramping routines but with the Absolute Scripting you will need to emulate this within the script by changing the speed for each command until it gets to the desired target speed.

Here is a example of two commands with no ramping. First we do a winding command of 100 winds with a pitch of 0.1mm which will end up with Bobbin at a position of 100 turns and Wire Feeder being at 10mm. Then it will do the same in the second command but have the Wire Feeder going left and back to 0 position.

100,10,1000,
200,0,1000,

In this example we have the speed set to 1000 and we really need to break this down into smaller commands so we create ramping.
As mentioned before you could do this in Excel but we have included in the software a BETA Insert Ramping button!

After Clicking this you will get the following screen appear

Using the Insert ramping calculator, it has three values that you can set.
Start RPM is the start speed you want the Bobbin motor to start at. 50 RPM is a pretty good starting point.
Turns is the amount of windings we want the ramp to be created across for both the ramp up and ramp down.
Steps is basically the divisor of how many speed increments of decrements get calculated across the mount of turns.

We next click the Calculate button and will end up with the result shown below:

The first column shows the original code.
The second column is the result of a resolution check of the machine. If the target positions are not divisible by the machine resolution settings then it would alter the result to match.
Third column will check if their are any 0,0,0, pauses in the script and I will explain more on this further down.
Fourth column is the breakdown of each command across the newly created ramping zone.
The fifth and final column is used by the LVDT calculator and we do not have to worry about it for this example.

I will paste the result below so you can see what the whole script looks like now.
In orange you can see the start and stop ramp that have been created.

0.05,0.005,50,
0.1,0.01,60,
0.15,0.015,69,
0.2,0.02,78,
0.25,0.025,88,
0.3,0.03,98,
0.35,0.035,107,
0.4,0.04,116,
0.45,0.045,126,
0.5,0.05,136,
0.55,0.055,145,
0.6,0.06,154,
0.65,0.065,164,
0.7,0.07,174,
0.75,0.075,183,
0.8,0.08,192,
0.85,0.085,202,
0.9,0.09,212,
0.95,0.095,221,
1,0.1,230,
1.05,0.105,240,
1.1,0.11,250,
1.15,0.115,259,
1.2,0.12,268,
1.25,0.125,278,
1.3,0.13,288,
1.35,0.135,297,
1.4,0.14,306,
1.45,0.145,316,
1.5,0.15,326,
1.55,0.155,335,
1.6,0.16,344,
1.65,0.165,354,
1.7,0.17,364,
1.75,0.175,373,
1.8,0.18,382,
1.85,0.185,392,
1.9,0.19,402,
1.95,0.195,411,
2,0.2,420,
2.05,0.205,430,
2.1,0.21,440,
2.15,0.215,449,
2.2,0.22,458,
2.25,0.225,468,
2.3,0.23,478,
2.35,0.235,487,
2.4,0.24,496,
2.45,0.245,506,
2.5,0.25,516,
2.55,0.255,525,
2.6,0.26,534,
2.65,0.265,544,
2.7,0.27,554,
2.75,0.275,563,
2.8,0.28,572,
2.85,0.285,582,
2.9,0.29,592,
2.95,0.295,601,
3,0.3,610,
3.05,0.305,620,
3.1,0.31,630,
3.15,0.315,639,
3.2,0.32,648,
3.25,0.325,658,
3.3,0.33,668,
3.35,0.335,677,
3.4,0.34,686,
3.45,0.345,696,
3.5,0.35,706,
3.55,0.355,715,
3.6,0.36,724,
3.65,0.365,734,
3.7,0.37,744,
3.75,0.375,753,
3.8,0.38,762,
3.85,0.385,772,
3.9,0.39,782,
3.95,0.395,791,
4,0.4,800,
4.05,0.405,810,
4.1,0.41,820,
4.15,0.415,829,
4.2,0.42,838,
4.25,0.425,848,
4.3,0.43,858,
4.35,0.435,867,
4.4,0.44,876,
4.45,0.445,886,
4.5,0.45,896,
4.55,0.455,905,
4.6,0.46,914,
4.65,0.465,924,
4.7,0.47,934,
4.75,0.475,943,
4.8,0.48,952,
4.85,0.485,962,
4.9,0.49,972,
4.95,0.495,981,
5,0.5,990,


100,10,1000,

195,0.5,1000,
195.05,0.495,990,
195.1,0.49,981,
195.15,0.485,972,
195.2,0.48,962,
195.25,0.475,952,
195.3,0.47,943,
195.35,0.465,934,
195.4,0.46,924,
195.45,0.455,914,
195.5,0.45,905,
195.55,0.445,896,
195.6,0.44,886,
195.65,0.435,876,
195.7,0.43,867,
195.75,0.425,858,
195.8,0.42,848,
195.85,0.415,838,
195.9,0.41,829,
195.95,0.405,820,
196,0.4,810,
196.05,0.395,800,
196.1,0.39,791,
196.15,0.385,782,
196.2,0.38,772,
196.25,0.375,762,
196.3,0.37,753,
196.35,0.365,744,
196.4,0.36,734,
196.45,0.355,724,
196.5,0.35,715,
196.55,0.345,706,
196.6,0.34,696,
196.65,0.335,686,
196.7,0.33,677,
196.75,0.325,668,
196.8,0.32,658,
196.85,0.315,648,
196.9,0.31,639,
196.95,0.305,630,
197,0.3,620,
197.05,0.295,610,
197.1,0.29,601,
197.15,0.285,592,
197.2,0.28,582,
197.25,0.275,572,
197.3,0.27,563,
197.35,0.265,554,
197.4,0.26,544,
197.45,0.255,534,
197.5,0.25,525,
197.55,0.245,516,
197.6,0.24,506,
197.65,0.235,496,
197.7,0.23,487,
197.75,0.225,478,
197.8,0.22,468,
197.85,0.215,458,
197.9,0.21,449,
197.95,0.205,440,
198,0.2,430,
198.05,0.195,420,
198.1,0.19,411,
198.15,0.185,402,
198.2,0.18,392,
198.25,0.175,382,
198.3,0.17,373,
198.35,0.165,364,
198.4,0.16,354,
198.45,0.155,344,
198.5,0.15,335,
198.55,0.145,326,
198.6,0.14,316,
198.65,0.135,306,
198.7,0.13,297,
198.75,0.125,288,
198.8,0.12,278,
198.85,0.115,268,
198.9,0.11,259,
198.95,0.105,250,
199,0.1,240,
199.05,0.095,230,
199.1,0.09,221,
199.15,0.085,212,
199.2,0.08,202,
199.25,0.075,192,
199.3,0.07,183,
199.35,0.065,174,
199.4,0.06,164,
199.45,0.055,154,
199.5,0.05,145,
199.55,0.045,136,
199.6,0.04,126,
199.65,0.035,116,
199.7,0.03,107,
199.75,0.025,98,
199.8,0.02,88,
199.85,0.015,78,
199.9,0.01,69,
199.95,0.005,60,
200,0,50,

As we can see the two commands have been converted down that now include 100 commands as a start ramp and 100 commands as a finish ramp, all with different speeds. In the middle of these commands is the the target positions at full speed of 1000 RPM.

Pauses

Now what if we had a pause in the script. Well the ideal scenario is that if we have a pause in the script then we need find where that pause is in the script and ramp down, pause the script and then create a new ramp up routine for the commands after the pause.
As mentioned the Insert Ramping is still BETA and we know we have some issues when we get pauses and we are still working out the bugs, so if you get errors where there are pauses in the script please bear with us as we are working on it.
If creating your ramping in Excel then you can insert your pauses and ramping routines yourself.

Or if you prefer to use the Insert Ramping calculator then create separate scripts, load them up, insert the ramping and then save. Next merge the scripts in excel and insert your pauses. Finally save this out as one script and load into the scripting engine.

Converting

You can also convert scripts created in the Standard Script Engine to Absolute scripts and some might find this easier if they did not want to create their scripts in excel.
In this example we will create a variable pitch winding using 40 windings and split into 4 segments.
So lets add the first segment of 10 turns with a pitch of 0.1mm

Next we will add 10 turns with a pitch of 0.2mm. In this example we are going to keep going to the right and you can ignore the other settings for now as they will be ignored when converted later.

We will carry on down and add the following commands also
10 turns with a pitch of 0.4mm
10 turns with a pitch of 0.5mm

In the screenshot below you can see all four commands now in the Script Window.
You could of course now run this script and it will run with no issues, but also you will notice that it will ramp up and ramp down after each command. You could turn off the ramping in each command and run again but you will hear a small noise between each command due to the delay in the USB latency.
By converting it to a Absolute Script we will get around this issue.

Now after we have added our four commands we can Click the Analyse/Convert button.
Next we click on the Absolute Scripting tab and we should see the following:

Now it has been converted to a Absolute Script we can then check on the simulator to see what our coil will look like.

This clearly shows the variable pitch being wound across our core.

All that is left to do is to add the ramping.
Our command before the ramping is
10,1,1000, Do 10 windings over a distance of 1mm to the Right, at a pitch of 0.1mm
20,3,1000, Do 10 windings over a distance of 2mm to the Right, at a pitch of 0.2mm
30,7,1000, Do 10 windings over a distance of 4mm to the Right, at a pitch of 0.4mm
40,12,1000, Do 10 windings over a distance of 5mm to the Right, at a pitch of 0.5mm

And after inserting the ramping we now have the following script:

0.05,0.005,50,
0.1,0.01,60,
0.15,0.015,69,
0.2,0.02,78,
0.25,0.025,88,
0.3,0.03,98,
0.35,0.035,107,
0.4,0.04,116,
0.45,0.045,126,
0.5,0.05,136,
0.55,0.055,145,
0.6,0.06,154,
0.65,0.065,164,
0.7,0.07,174,
0.75,0.075,183,
0.8,0.08,192,
0.85,0.085,202,
0.9,0.09,212,
0.95,0.095,221,
1,0.1,230,
1.05,0.105,240,
1.1,0.11,250,
1.15,0.115,259,
1.2,0.12,268,
1.25,0.125,278,
1.3,0.13,288,
1.35,0.135,297,
1.4,0.14,306,
1.45,0.145,316,
1.5,0.15,326,
1.55,0.155,335,
1.6,0.16,344,
1.65,0.165,354,
1.7,0.17,364,
1.75,0.175,373,
1.8,0.18,382,
1.85,0.185,392,
1.9,0.19,402,
1.95,0.195,411,
2,0.2,420,
2.05,0.205,430,
2.1,0.21,440,
2.15,0.215,449,
2.2,0.22,458,
2.25,0.225,468,
2.3,0.23,478,
2.35,0.235,487,
2.4,0.24,496,
2.45,0.245,506,
2.5,0.25,516,
2.55,0.255,525,
2.6,0.26,534,
2.65,0.265,544,
2.7,0.27,554,
2.75,0.275,563,
2.8,0.28,572,
2.85,0.285,582,
2.9,0.29,592,
2.95,0.295,601,
3,0.3,610,
3.05,0.305,620,
3.1,0.31,630,
3.15,0.315,639,
3.2,0.32,648,
3.25,0.325,658,
3.3,0.33,668,
3.35,0.335,677,
3.4,0.34,686,
3.45,0.345,696,
3.5,0.35,706,
3.55,0.355,715,
3.6,0.36,724,
3.65,0.365,734,
3.7,0.37,744,
3.75,0.375,753,
3.8,0.38,762,
3.85,0.385,772,
3.9,0.39,782,
3.95,0.395,791,
4,0.4,800,
4.05,0.405,810,
4.1,0.41,820,
4.15,0.415,829,
4.2,0.42,838,
4.25,0.425,848,
4.3,0.43,858,
4.35,0.435,867,
4.4,0.44,876,
4.45,0.445,886,
4.5,0.45,896,
4.55,0.455,905,
4.6,0.46,914,
4.65,0.465,924,
4.7,0.47,934,
4.75,0.475,943,
4.8,0.48,952,
4.85,0.485,962,
4.9,0.49,972,
4.95,0.495,981,
5,0.5,990,


10,1,1000,
20,3,1000,
30,7,1000,
35,9.5,1000,

35.05,9.525,990,
35.1,9.55,981,
35.15,9.575,972,
35.2,9.6,962,
35.25,9.625,952,
35.3,9.65,943,
35.35,9.675,934,
35.4,9.7,924,
35.45,9.725,914,
35.5,9.75,905,
35.55,9.775,896,
35.6,9.8,886,
35.65,9.825,876,
35.7,9.85,867,
35.75,9.875,858,
35.8,9.9,848,
35.85,9.925,838,
35.9,9.95,829,
35.95,9.975,820,
36,10,810,
36.05,10.025,800,
36.1,10.05,791,
36.15,10.075,782,
36.2,10.1,772,
36.25,10.125,762,
36.3,10.15,753,
36.35,10.175,744,
36.4,10.2,734,
36.45,10.225,724,
36.5,10.25,715,
36.55,10.275,706,
36.6,10.3,696,
36.65,10.325,686,
36.7,10.35,677,
36.75,10.375,668,
36.8,10.4,658,
36.85,10.425,648,
36.9,10.45,639,
36.95,10.475,630,
37,10.5,620,
37.05,10.525,610,
37.1,10.55,601,
37.15,10.575,592,
37.2,10.6,582,
37.25,10.625,572,
37.3,10.65,563,
37.35,10.675,554,
37.4,10.7,544,
37.45,10.725,534,
37.5,10.75,525,
37.55,10.775,516,
37.6,10.8,506,
37.65,10.825,496,
37.7,10.85,487,
37.75,10.875,478,
37.8,10.9,468,
37.85,10.925,458,
37.9,10.95,449,
37.95,10.975,440,
38,11,430,
38.05,11.025,420,
38.1,11.05,411,
38.15,11.075,402,
38.2,11.1,392,
38.25,11.125,382,
38.3,11.15,373,
38.35,11.175,364,
38.4,11.2,354,
38.45,11.225,344,
38.5,11.25,335,
38.55,11.275,326,
38.6,11.3,316,
38.65,11.325,306,
38.7,11.35,297,
38.75,11.375,288,
38.8,11.4,278,
38.85,11.425,268,
38.9,11.45,259,
38.95,11.475,250,
39,11.5,240,
39.05,11.525,230,
39.1,11.55,221,
39.15,11.575,212,
39.2,11.6,202,
39.25,11.625,192,
39.3,11.65,183,
39.35,11.675,174,
39.4,11.7,164,
39.45,11.725,154,
39.5,11.75,145,
39.55,11.775,136,
39.6,11.8,126,
39.65,11.825,116,
39.7,11.85,107,
39.75,11.875,98,
39.8,11.9,88,
39.85,11.925,78,
39.9,11.95,69,
39.95,11.975,60,
40,12,50,

Again you can see the ramping up/down across 5 turns highlighted in orange.

Extra settings

In the Absolute Scripting we also have some extra settings that could smooth out the running of your script.

If your variable pitch scripts use a very wide pitch at the end of the layers you can fine tune the software to give us a smooth winding motion at higher speeds.
So, we have two modes in the software when it comes to executing the Script.

The first is Constant Velocity mode and the firmware will load each winding command and execute the commands one after the other without really caring if there is a pulse overshoot/undershoot on the bobbin motor or feeder motor and will correct later on down the script.
This works great with no drift in the finish position when running up to speeds of around 1000 RPM but going higher RPM there can be a very small drift at the end of the winding. This drift is very small and probably can be lived with but we want to get it as close as we can.

The next mode is Exact Stop and, in this mode, it will execute each command and will not move onto the next command until both bobbin motor and feeder motor pulses are exactly what they should be.
This is very accurate and even at high speeds it stops exactly where it should and no drift.
But when in this mode the machine is much noisier as you hear a little click between each command, it is not huge but it can be noticed.

There is also a Direction delay where it can do Constant Velocity until it detects a direction change and then will do a Exact Stop at the change of direction.

Hopefully the information above explains more about the Absolute Scripting and will help out.