Wrapped Rotary on Non Rotary Axis Letter.

  • jschulze
  • Away
  • Junior Member
  • Junior Member
More
29 Sep 2025 13:50 #335545 by jschulze
I've got my machine setup to use a rotary table as the W axis since I already have a C axis on the head.  I've added wrapped_rotary=1 to my ini in both the joint and axis sections, but it's not working.  Does wrapped rotary only work on A,B, or C axis?

I also have the rotary table setup as a second axis and what I would like to ultimately do is setup the rotary table to wrap the axis position at 360 and also keep track of the position while using it as a spindle.  Right now I just use a generic mux2 to switch the joint velocity between W axis velocity and spindle 1 velocity signals using the spindle.1.on and it works great, but I'm not sure how to keep the axis position when it's in spindle mode.  I'm using step/dir servos to drive the table, so I don't have an encoder on the table output itself.  Is there a way to fake an encoder signal from the spindle output to feedback into the joint position?  

Please Log in or Create an account to join the conversation.

More
29 Sep 2025 14:19 #335548 by langdons
Replied by langdons on topic Wrapped Rotary on Non Rotary Axis Letter.
Does the letter matter?

Isn't it just a visual ID?

Please Log in or Create an account to join the conversation.

  • jschulze
  • Away
  • Junior Member
  • Junior Member
More
29 Sep 2025 16:34 #335556 by jschulze
Replied by jschulze on topic Wrapped Rotary on Non Rotary Axis Letter.

Does the letter matter?

Isn't it just a visual ID?

Not sure.  Either way it's not working for me and I'm not sure why.  It works no problem as a rotary axis, but I'd like to figure out a way to keep position while using it as a spindle and I figure that will be easier if it wraps at 360.  

Please Log in or Create an account to join the conversation.

More
29 Sep 2025 17:37 - 29 Sep 2025 17:39 #335559 by Aciera
Replied by Aciera on topic Wrapped Rotary on Non Rotary Axis Letter.
Looking for 'WRAPPED_ROTARY' in the source code seems to suggest that it indeed only applies to axes A,B,C:
~/git/linuxcnc-dev$ grep -rnw ./ -e WRAPPED_ROTARY
./configs/sim/axis/wrapped_rotary/wrapped_rotary.ini:85:WRAPPED_ROTARY = 1
./bin/axis:3516:a_axis_wrapped = inifile.find("AXIS_A", "WRAPPED_ROTARY")
./bin/axis:3517:b_axis_wrapped = inifile.find("AXIS_B", "WRAPPED_ROTARY")
./bin/axis:3518:c_axis_wrapped = inifile.find("AXIS_C", "WRAPPED_ROTARY")
./src/emc/rs274ngc/rs274ngc_pre.cc:872: inifile.Find(&_setup.a_axis_wrapped, "WRAPPED_ROTARY", "AXIS_A");
./src/emc/rs274ngc/rs274ngc_pre.cc:873: inifile.Find(&_setup.b_axis_wrapped, "WRAPPED_ROTARY", "AXIS_B");
./src/emc/rs274ngc/rs274ngc_pre.cc:874: inifile.Find(&_setup.c_axis_wrapped, "WRAPPED_ROTARY", "AXIS_C");
./src/emc/usr_intf/axis/scripts/axis.py:3514:a_axis_wrapped = inifile.find("AXIS_A", "WRAPPED_ROTARY")
./src/emc/usr_intf/axis/scripts/axis.py:3515:b_axis_wrapped = inifile.find("AXIS_B", "WRAPPED_ROTARY")
./src/emc/usr_intf/axis/scripts/axis.py:3516:c_axis_wrapped = inifile.find("AXIS_C", "WRAPPED_ROTARY")
./src/emc/usr_intf/gremlin/qt5_graphics.py:274: self.a_axis_wrapped = self.inifile.find("AXIS_A", "WRAPPED_ROTARY")
./src/emc/usr_intf/gremlin/qt5_graphics.py:275: self.b_axis_wrapped = self.inifile.find("AXIS_B", "WRAPPED_ROTARY")
./src/emc/usr_intf/gremlin/qt5_graphics.py:276: self.c_axis_wrapped = self.inifile.find("AXIS_C", "WRAPPED_ROTARY")
./src/emc/usr_intf/gremlin/gremlin.py:204: self.a_axis_wrapped = inifile.find("AXIS_A", "WRAPPED_ROTARY")
./src/emc/usr_intf/gremlin/gremlin.py:205: self.b_axis_wrapped = inifile.find("AXIS_B", "WRAPPED_ROTARY")
./src/emc/usr_intf/gremlin/gremlin.py:206: self.c_axis_wrapped = inifile.find("AXIS_C", "WRAPPED_ROTARY")
grep: ./src/objects/emc/rs274ngc/rs274ngc_pre.o: binary file matches
./docs/src/config/ini-config.adoc:902:* `WRAPPED_ROTARY = 1` - When this is set to 1 for an ANGULAR axis the axis will move 0-359.999 degrees.
grep: ./lib/librs274.so.0: binary file matches
./lib/python/qt5_graphics.py:274: self.a_axis_wrapped = self.inifile.find("AXIS_A", "WRAPPED_ROTARY")
./lib/python/qt5_graphics.py:275: self.b_axis_wrapped = self.inifile.find("AXIS_B", "WRAPPED_ROTARY")
./lib/python/qt5_graphics.py:276: self.c_axis_wrapped = self.inifile.find("AXIS_C", "WRAPPED_ROTARY")
./lib/python/gremlin.py:204: self.a_axis_wrapped = inifile.find("AXIS_A", "WRAPPED_ROTARY")
./lib/python/gremlin.py:205: self.b_axis_wrapped = inifile.find("AXIS_B", "WRAPPED_ROTARY")
./lib/python/gremlin.py:206: self.c_axis_wrapped = inifile.find("AXIS_C", "WRAPPED_ROTARY")
 
Last edit: 29 Sep 2025 17:39 by Aciera.

Please Log in or Create an account to join the conversation.

  • jschulze
  • Away
  • Junior Member
  • Junior Member
More
29 Sep 2025 19:32 #335566 by jschulze
Replied by jschulze on topic Wrapped Rotary on Non Rotary Axis Letter.

Looking for 'WRAPPED_ROTARY' in the source code seems to suggest that it indeed only applies to axes A,B,C:
~/git/linuxcnc-dev$ grep -rnw ./ -e WRAPPED_ROTARY
./configs/sim/axis/wrapped_rotary/wrapped_rotary.ini:85:WRAPPED_ROTARY = 1
./bin/axis:3516:a_axis_wrapped = inifile.find("AXIS_A", "WRAPPED_ROTARY")
./bin/axis:3517:b_axis_wrapped = inifile.find("AXIS_B", "WRAPPED_ROTARY")
./bin/axis:3518:c_axis_wrapped = inifile.find("AXIS_C", "WRAPPED_ROTARY")
./src/emc/rs274ngc/rs274ngc_pre.cc:872: inifile.Find(&_setup.a_axis_wrapped, "WRAPPED_ROTARY", "AXIS_A");
./src/emc/rs274ngc/rs274ngc_pre.cc:873: inifile.Find(&_setup.b_axis_wrapped, "WRAPPED_ROTARY", "AXIS_B");
./src/emc/rs274ngc/rs274ngc_pre.cc:874: inifile.Find(&_setup.c_axis_wrapped, "WRAPPED_ROTARY", "AXIS_C");
./src/emc/usr_intf/axis/scripts/axis.py:3514:a_axis_wrapped = inifile.find("AXIS_A", "WRAPPED_ROTARY")
./src/emc/usr_intf/axis/scripts/axis.py:3515:b_axis_wrapped = inifile.find("AXIS_B", "WRAPPED_ROTARY")
./src/emc/usr_intf/axis/scripts/axis.py:3516:c_axis_wrapped = inifile.find("AXIS_C", "WRAPPED_ROTARY")
./src/emc/usr_intf/gremlin/qt5_graphics.py:274: self.a_axis_wrapped = self.inifile.find("AXIS_A", "WRAPPED_ROTARY")
./src/emc/usr_intf/gremlin/qt5_graphics.py:275: self.b_axis_wrapped = self.inifile.find("AXIS_B", "WRAPPED_ROTARY")
./src/emc/usr_intf/gremlin/qt5_graphics.py:276: self.c_axis_wrapped = self.inifile.find("AXIS_C", "WRAPPED_ROTARY")
./src/emc/usr_intf/gremlin/gremlin.py:204: self.a_axis_wrapped = inifile.find("AXIS_A", "WRAPPED_ROTARY")
./src/emc/usr_intf/gremlin/gremlin.py:205: self.b_axis_wrapped = inifile.find("AXIS_B", "WRAPPED_ROTARY")
./src/emc/usr_intf/gremlin/gremlin.py:206: self.c_axis_wrapped = inifile.find("AXIS_C", "WRAPPED_ROTARY")
grep: ./src/objects/emc/rs274ngc/rs274ngc_pre.o: binary file matches
./docs/src/config/ini-config.adoc:902:* `WRAPPED_ROTARY = 1` - When this is set to 1 for an ANGULAR axis the axis will move 0-359.999 degrees.
grep: ./lib/librs274.so.0: binary file matches
./lib/python/qt5_graphics.py:274: self.a_axis_wrapped = self.inifile.find("AXIS_A", "WRAPPED_ROTARY")
./lib/python/qt5_graphics.py:275: self.b_axis_wrapped = self.inifile.find("AXIS_B", "WRAPPED_ROTARY")
./lib/python/qt5_graphics.py:276: self.c_axis_wrapped = self.inifile.find("AXIS_C", "WRAPPED_ROTARY")
./lib/python/gremlin.py:204: self.a_axis_wrapped = inifile.find("AXIS_A", "WRAPPED_ROTARY")
./lib/python/gremlin.py:205: self.b_axis_wrapped = inifile.find("AXIS_B", "WRAPPED_ROTARY")
./lib/python/gremlin.py:206: self.c_axis_wrapped = inifile.find("AXIS_C", "WRAPPED_ROTARY")
 

Thanks so much for checking.  I'll try to figure out a different solution.

Please Log in or Create an account to join the conversation.

More
30 Sep 2025 00:21 #335585 by langdons
Replied by langdons on topic Wrapped Rotary on Non Rotary Axis Letter.
What axes does your setup have?

Perhaps having unlimited "WRAPPED_ROTARY" axes on any axis letter is a feature should be added to the source code.

Please Log in or Create an account to join the conversation.

  • jschulze
  • Away
  • Junior Member
  • Junior Member
More
30 Sep 2025 01:07 #335593 by jschulze
Replied by jschulze on topic Wrapped Rotary on Non Rotary Axis Letter.

What axes does your setup have?

Perhaps having unlimited "WRAPPED_ROTARY" axes on any axis letter is a feature should be added to the source code.

I'm using XYZACW.  It's a router with an CA style head.  The W axis is an additional "C" axis rotary table, but I didn't want to use B because the kinematics file I'm using for TCP has a B axis and I don't know how to mess with the kinematic enough to make it ignore the B axis commands.  

Please Log in or Create an account to join the conversation.

More
30 Sep 2025 13:56 #335620 by langdons
Replied by langdons on topic Wrapped Rotary on Non Rotary Axis Letter.
Hmm...

There must be a solution so your setup can be XYZABC.

How does the PC communicate with the machine?

Please Log in or Create an account to join the conversation.

  • jschulze
  • Away
  • Junior Member
  • Junior Member
More
30 Sep 2025 14:56 #335624 by jschulze
Replied by jschulze on topic Wrapped Rotary on Non Rotary Axis Letter.

Hmm...

There must be a solution so your setup can be XYZABC.

How does the PC communicate with the machine?

I use a Mesa 7i76eu with ethernet.  I'm guessing with a little trial and error I could modify the kinematics file to just set the B axis value to a constant 0 to avoid it being in the calculations for TCP and then passthrough the actual value to my joint.  The actual matrix math stuff is well beyond my level, so I'd rather leave that alone.  Not totally sure I'd want to label it B axis instead of W anyway, since B wraps around Y in my head.

I'm going to work a bit on trying to get the axis to retain position values when it's in spindle mode, I'm using a step/dir servo, so I need to figure out a way to keep track of position somehow.

Please Log in or Create an account to join the conversation.

More
30 Sep 2025 15:48 #335628 by langdons
Replied by langdons on topic Wrapped Rotary on Non Rotary Axis Letter.
I am impoving a Java macro program called Repeat that uses matrices to identify mouse gestures; it works, but I have absolutely no idea how or why it works.

Please Log in or Create an account to join the conversation.

Time to create page: 0.078 seconds
Powered by Kunena Forum