Interchange 5041 and 5042 (it is Y followed by X, i.e., height followed by base of the right-angled triangle)
In G68, X and Y are center of rotation. Use accordingly. If you skip X and Y, the current tool position becomes the center of rotation.
Hello
Im working on a small macro progam to make it easier for operators to align the part and i can't get it to work as i want, hopefully someone out there can help out.
So lets say you have a part with some holes you need to put on a tombstone, today the operator needs to align the holes perfectly with the Y or X axis, what i want it to just find one hole calculate the angle and use G68 to rotate the program.
I did some test's where i position the tool at X25 Y-43.3 then G65 P9999 C120. and position to X43.3 Y-25. here i would think that it shouldn't have moved since the new position is the old one.
This is what i got.
O9999(FIND ANGLE FOR PART)
G90G69
(USAGE G65 P9999 C=ANGLE OF ORIGIN HOLE)
IF [#3 EQ #0] THEN [#3=0]
#101=ATAN [#5041]/[#5042]-#3 (CALCULATED ANGLE)
G68 X0.Y0. R#101 (maybe this should be G68 X-#5041 Y-#5042 R#101)
M99
Similar Threads:
Interchange 5041 and 5042 (it is Y followed by X, i.e., height followed by base of the right-angled triangle)
In G68, X and Y are center of rotation. Use accordingly. If you skip X and Y, the current tool position becomes the center of rotation.
U sure? ATAN[43.3]/[-25.] gives me 120 which is correct ATAN=[X]/[Y]
It is [height]/[base].
But, it depends on how you define angle/height/base.
Therefore, if you get expected result, continue with your method.
hey proto / i also use something prety similar; here are the steps :
program 1 : detection of whatever geometry ( for example center of 2 holes ), so to compute the rotational angle + log the value
program 2 : check whatever else geometry, so to verify that rota angle was corect ( eq : check position of a 3rd hole, so to be sure that it is where it should be ); this step is not critical, but it gives peace of mind
main program : run
sometimes it may be possible ( by accident ) to forget to run program 1, or a fail on program 1 that won't make the operator aware : as a result, the rota angle is not computed correct; here are some sugestions, to handle this case :
... run program 2, or
... check inside main program, right at the begining, if program 1 was executed :
...... succesfull, and/or :
...... just before main program, and/or :
...... for the actual running session of the main program, and not for the previous run
* safety checks depend on available control functions
you know, safety 1st, or bet on the operators kindly
ps : if things are simple, than also it may be better to join all steps inside a single program, so to avoid the need to switch between programs; in such a case, it may be required to restart the program at a machining sequence, thus jumping over the step where the rota angle is computed; this can be achieved by /, or a restart flag, or a prompt, etc
we are merely at the start of " Internet of Things / Industrial Revolution 4.0 " era : a mix of AI, plastics, human estrangement, powerful non-state actors ...
just one more thing : when probing a tilted part, computing the rota angle requires a bit of math with the output data from the probe
in most cases, pls be aware that output data is not absolute, but relative; however, the result is ( can be considered ) absolute
in attached image, for a given part ( black countour ), the probing points will be somewhere among the blue lines; the distance between the 2 blue lines is affected by how the probe handles cosine directions; if the probe handles them well, than it is possible to get the center of a known diameter with only 1 probe touch, or more points, located in a tight vecinity, among an arch with a minimal length
such probes are generally on coordinates measuring machines / kindly
we are merely at the start of " Internet of Things / Industrial Revolution 4.0 " era : a mix of AI, plastics, human estrangement, powerful non-state actors ...