NEWS
LinuxCNC 2.5.2 Release
LinuxCNC 2.5.2 Update Released (changelog).
 
LinuxCNC 2.5.1 Release

LinuxCNC 2.5.1 Update Released (changelog). If the Package Manager does not prompt you to upgrade see this page.

 
LinuxCNC 2.5.0 Release
New major release (changelog). See the instructions to update your system from EMC 2.4 to LinuxCNC 2.5.
 
Home Forum Using LinuxCNC AXIS Waiting for S.Axes problem

Welcome, Guest
Username: Password: Remember me

TOPIC: Waiting for S.Axes problem

Re:Waiting for S.Axes problem 18 Jun 2012 16:09 #21071

  • VNR
  • VNR's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 59
  • Thank you received: 2
  • Karma: 5
Finally i found the bug:
The Axis prints "waiting for s.axes" because hal_ppmc driver crashes at line 1147.

src/hal/drivers/hal_ppmc.c -> funcion static void read_encoders(slot_data_t *slot)
1146 } else {
1147 *(slot->encoder.vel) = vel; // encoder without timestamp
1148 }

The tracking history:
1) Axis prints "waiting for s.axes" because src/emc/ini/iniaxis.cc fails in function loadAxis at emcAxisSetBacklash
2) src/emc/task/taskintf.cc fails at function emcAxisSetBacklash because function usrmotWriteWriteEmcmotCommand fails.
3) src/emc/motion/usrmotintf.cc fails at function usrmotWriteEmcmotCommand because function usrmotReadEmcmotStatus always return s.commandNumEcho = 0 (must be equal to commandNum sent)
4) Fixed this Axis loads.
5) But now i get an RTAPI fault.
6) So i read rtfaults.txt ( git.linuxcnc.org/gitweb?p=linuxcnc.git;a...rtfaults.txt;hb=HEAD ) and found that the problem was hal_ppmc.c at line 1147.
7) I commented that line and recompile.
8) I got back with the change in 4) and recompile again.
9) Now i can run the univstep example config (with Axis and hal_ppmc driver). I can get out of estop, home all and MDI G0 X100 Y100 Z100.
The administrator has disabled public write access.

Re:Waiting for S.Axes problem 18 Jun 2012 16:23 #21072

  • andypugh
  • andypugh's Avatar
  • NOW ONLINE
  • Moderator
  • Posts: 4135
  • Thank you received: 141
  • Karma: 129
You could try a bug report about this:
sourceforge.net/tracker/?atid=106744&group_id=6744&func=browse
I am not sure which of the module authors is currently active though.
The administrator has disabled public write access.

Re:Waiting for S.Axes problem 18 Jun 2012 20:01 #21075

  • jmelson
  • jmelson's Avatar
  • NOW ONLINE
  • Moderator
  • Posts: 264
  • Thank you received: 10
  • Karma: 31
VNR wrote:
Finally i found the bug:
The Axis prints "waiting for s.axes" because hal_ppmc driver crashes at line 1147.

src/hal/drivers/hal_ppmc.c -> funcion static void read_encoders(slot_data_t *slot)
1146 } else {
1147 *(slot->encoder.vel) = vel; // encoder without timestamp
1148 }

The tracking history:
1) Axis prints "waiting for s.axes" because src/emc/ini/iniaxis.cc fails in function loadAxis at emcAxisSetBacklash
2) src/emc/task/taskintf.cc fails at function emcAxisSetBacklash because function usrmotWriteWriteEmcmotCommand fails.
3) src/emc/motion/usrmotintf.cc fails at function usrmotWriteEmcmotCommand because function usrmotReadEmcmotStatus always return s.commandNumEcho = 0 (must be equal to commandNum sent)
4) Fixed this Axis loads.
5) But now i get an RTAPI fault.
6) So i read rtfaults.txt ( git.linuxcnc.org/gitweb?p=linuxcnc.git;a...rtfaults.txt;hb=HEAD ) and found that the problem was hal_ppmc.c at line 1147.
7) I commented that line and recompile.
8) I got back with the change in 4) and recompile again.
9) Now i can run the univstep example config (with Axis and hal_ppmc driver). I can get out of estop, home all and MDI G0 X100 Y100 Z100.
WOW, I can't believe this is the first person to hit this bug! Now, this code has been only in the
development version of LinuxCNC for a long time, waiting for the long-fabled 2.5 version to come
out. This was done in November 2010!

OHHHHH! NOW I understand! This error REQUIRES the board to be very old (Pre ver 2),
from before late 2006.

What is going on is that the function export_encoders() should always export the velocity pin,
no matter what rev the board is. But, only if the board is greater than ver 2 does the current code
do that. For some reason, this was bundled with the encoder timestamp and index-enable
features. Older USC boards don't have properly working encoder index logic.
But, all encoders should be able to produce a scaled velocity from the position delta, so it
should always export the velocity HAL pin.

I am driving to the CNC Workshop on Wednesday, and will be coming back on Sunday.
I'm a little afraid to hack into this and make things worse.
But, if VNR doesn't need the
scaled velocity, commenting out that line is fine. If he does want that, then the fix is to
move lines 2141-2145 up before line 2132. Since no USC board has timestamping of
the encoder counter, it will just scale the encoder delta value.

I'm not sure I can cobble together a board of that old revision, that used a 5 V FPGA
instead of the newer 3.3/1.8 V FPGA, so I can't just put old firmware in a new board
for testing.

Well, thanks to VNR for finding a bug I should have tracked down!

Jon
The administrator has disabled public write access.

Re:Waiting for S.Axes problem 18 Jun 2012 20:30 #21076

  • jmelson
  • jmelson's Avatar
  • NOW ONLINE
  • Moderator
  • Posts: 264
  • Thank you received: 10
  • Karma: 31
jmelson wrote:
I'm a little afraid to hack into this and make things worse.
Well, after looking at it a bit, the fix seemed so obvious and simple, that
I went ahead and pushed, seems to be in the v2.5_branch tree, is
this the right place to be putting this?

Thanks,

Jon
Last Edit: 18 Jun 2012 20:47 by jmelson.
The administrator has disabled public write access.

Re:Waiting for S.Axes problem 19 Jun 2012 02:04 #21084

  • andypugh
  • andypugh's Avatar
  • NOW ONLINE
  • Moderator
  • Posts: 4135
  • Thank you received: 141
  • Karma: 129
jmelson wrote:
I went ahead and pushed, seems to be in the v2.5_branch tree, is
this the right place to be putting this?
Yes, that gets it in as a bugfix in 2.5, and it will then get merged into the dev branch in a day or so.
The administrator has disabled public write access.

Re:Waiting for S.Axes problem 19 Jun 2012 05:13 #21090

  • ArcEye
  • ArcEye's Avatar
  • NOW ONLINE
  • Moderator
  • Posts: 1335
  • Thank you received: 102
  • Karma: 129
WOW, I can't believe this is the first person to hit this bug!
I'm not sure if he is the first, but he is certainly the first to resolve it. Well done!

These 2 threads are pretty much unresolved and the errors look similar
(well second resolved but print similar)
www.linuxcnc.org/index.php/english/compo...=38&id=20554&limit=6
www.linuxcnc.org/index.php/english/compo...tid=9&id=20485#20535

There is at least one more but I can't find it presently.

The error print
Debug file information:
Can not find -sec MOT -var MOT -num 1
Can not find -sec IO -var IO -num 1
Can not find -sec LINUXCNC -var NML_FILE -num 1
Can not find -sec EMC -var NML_FILE -num 1


seems to be coming up since 2.5 and appears to suggest a problem parsing / finding the .ini file
but that looks like that is a purple bloater and the problem was elsewhere.

regards
Last Edit: 19 Jun 2012 05:18 by ArcEye.
The administrator has disabled public write access.
Time to create page: 1.929 seconds
Powered by Kunena Forum
© 2013 LinuxCNC.org
Joomla! is Free Software released under the GNU General Public License.