Author Topic: "Spinning" Axis "Endlessly"  (Read 149 times)

designfugitives

  • Robots in Architecture Members
  • Forum User
  • *
  • Posts: 12
    • View Profile
"Spinning" Axis "Endlessly"
« on: September 24, 2020, 02:00:28 AM »
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

  • Lead Developer
  • Administrator
  • Forum User
  • *****
  • Posts: 1067
    • View Profile
    • Robots in Architecture
Re: "Spinning" Axis "Endlessly"
« Reply #1 on: September 24, 2020, 08:47:48 PM »
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

  • Robots in Architecture Members
  • Forum User
  • *
  • Posts: 12
    • View Profile
Re: "Spinning" Axis "Endlessly"
« Reply #2 on: September 29, 2020, 07:52:55 PM »
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

  • Lead Developer
  • Administrator
  • Forum User
  • *****
  • Posts: 1067
    • View Profile
    • Robots in Architecture
Re: "Spinning" Axis "Endlessly"
« Reply #3 on: September 29, 2020, 09:44:11 PM »
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

  • Robots in Architecture Members
  • Forum User
  • *
  • Posts: 12
    • View Profile
Re: "Spinning" Axis "Endlessly"
« Reply #4 on: September 30, 2020, 01:21:23 AM »
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

  • Lead Developer
  • Administrator
  • Forum User
  • *****
  • Posts: 1067
    • View Profile
    • Robots in Architecture
Re: "Spinning" Axis "Endlessly"
« Reply #5 on: September 30, 2020, 09:01:52 AM »
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