"Spinning" Axis "Endlessly"

Started by designfugitives, September 24, 2020, 02:00:28 AM

Previous topic - Next topic

designfugitives

I have axis4 type set to Endless.  Here's my quick code:

FOR Counter=1 TO 20 STEP 1
   PTP_REL {A4 360}
ENDFOR
FOR Counter=1 TO 20 STEP 1
   PTP_REL {A4 -360}
ENDFOR

This doesn't "spin" axis around around 360 degrees but rather like 5 and also there's a short pause between each of the FOR loop step.

What's the proper syntax for axis4to keep spinning endlessly in positive or negative?

Thanks.



Johannes @ Robots in Architecture

You could try to modify the code as follows to get a continuous motion:

FOR Counter=1 TO 20 STEP 1
   PTP_REL {A4 360} C_PTP
   CONTINUE
ENDFOR

However I cannot think of an easy way to get an axis to rotate with continuous speed "in the background" if that is what you are going for,

Best,
Johannes

designfugitives

What does adding C_PTP and CONTINUE do?  I read about the C_PTP in the expert programming manual but not sure how that changes my code.  Haven't looked up CONTINUE yet.

Here's a different way to ask the question.  If Axis4 starts at 0, will the code below spin it 100 revolutions and then back to 0?

PTP_REL {A4 36000} C_PTP
PTP_REL {A4 -36000} C_PTP

T

Johannes @ Robots in Architecture

C_PTP makes the robot blend the movement, it can be parametrized through a variable at which point the robot leaves the toolpath to achieve a smooth motion. Note that it will then not exactly move through the programmed point but may take a "shortcut". In order to be able to blend movements, the robot needs to look into the "future", i.e. a few lines ahead in the code. CONTINUE allows the robot to move through the loop, rather than waiting for the robot to catch up. CONTINUE does not work for all logic types, I cannot promise 100% that it works with a FOR loop.
And regarding the other question, it depends how your axis is set up. If you give A4 simply very high limits, then you would get 100 rotations. If you set it to infinite rotation, then it won't move at all because for infinite rotation, 0 degrees, 360 degrees, 3600 degrees etc. are identical.

Best,
Johannes

designfugitives

Thank you for the explanation.

I tried to set Axis 4 type as rotation (3) with a limit of -/+7200.  I get two errors: $SOFTN_END[4] invalid value and $SOFTP_END[4] invalid value.  Is there another system variable that could limit the the range?

Johannes @ Robots in Architecture

Hmm.. It seems that values >= 360 are only possible for linear axes.
You could try setting A4 as a linear axis type, though I'm not sure how/if that will affect the kinematics... Be careful and only do it in T1.

Best,
Johannes