Attempting to write a "brain formula" that uses variables.
By swinging a rotary b & c axis head.
Something like the following:
v0=userdro(1198) 'C axis Swing Radius user inputted
v1=userdro(1199) 'B axis Swing radius tool holder face position
v2=ToolLengthOffset
v3=v0-((cos(c/180*3.1416)*v0) 'calculate the cosine of the C axis angle
v4=(sin(c/180*3.1416)*-v0 'calculate the sine of C
v5=Y Position 'get the current position
v6=X Position
v7=Z Position
v8=v3+v5 'compute for new position
v9=v4+v6
Y Position = v8 'update the dro to the new position
X position = v9
'Now drive to location
I can calculate the positions and pass them the the X and Y positions. The
screen shows the computed value after I move C axis. Seems like I could do this
in all one swing move.
Could someone pass along a reference document how these variables & formulas
work.
I can create a calculated value but cant seem to add or pass them back.
And what correlation is there to Mach3 variables?
DRO(801)=v? or y?
a b c etc... not sure if they are axis's or variables.
Seems like both.
As fast as the brains run they should be able to update positions in real time.
I looked at formulas under Functions Config but they dont seem to do anymore
than let me test the calculations. I am running 3.42.40
My lack of gray matter as I get older.
Thanks for any guidance.