Axis 2.9.0~pre: jogging moves the tool cone, but not the steppers

More
4 years 1 month ago #252631 by Dr. John
FWIW, here’s some more info on this problem. Recently, I’ve been tossing out old computers due to a pending move, so I’ve really got no spares. But, I realized that my old 32 bit LinuxCNC computer was still a viable candidate for installing the latest version of LinuxCNC, which I did. The results were unexpected: exactly the same. pncconf works just fine; axis doesn’t at all. These results don’t help isolate the problem much, but they tend to rule out the probability of a problem with the computer hardware or the OS (the old one is Lubuntu 18.04).

What more then could I do to triangulate the problem? Well, I had additional data from tcpdump, so I decided to analyze it. Each analysis included about 100,000 packets. Here are my results.

1) On average, there are two packets transmitted by the computer for each one transmitted by the card. The standard deviation of the times between packets is about 35us and the maximum period between a received packet and the next transmitted one in successive packets, i.e, the two that come before the response packet ,is 880us typically, and exceeds 950us once (954us). There are zero dropped packets.

2) I reverse engineered the communication protocol within the udp packets in accordance with the documentation for the 7i96s card. All packets are being transmitted are within the bounds of the documented protocol (although I can’t dig deeper than this because it requires a deeper understanding of how the card works than I’m willing to try to get). All of the response packets return the correct number of bytes in accordance with the read commands.

3) This true for both axis and pncconf. The differences between the two sets of results are essentially zero.

What this tells me is that the ethernet hardware, the handlers within the OS, and the parts of LinuxCNC that are involved with setting up packets, transmitting and receiving them, and scheduling their transmissions are working correctly. It appears that the firmware in the card is working correctly too, at least as it relates to the reception, interpretation and response to the packets it receives. Though I don’t know for sure, I assume that the handlers for these operations are identical for pncconf and axis.

From arvidb’s documentation of the communications call stack and from my further investigation into the hm2eth software, it seems improbable that something is mangled along the way. The message handling seems straightforward, although how it gets from level to level is not always obvious (to me).

This suggests some sort of incompatibility between axis and the 7i96s card that I have. Given that pncconf moves the axes on my mill correctly with the 7i96s, I have doubts about whether the problem is with the card, but can’t entirely eliminate it. Could it be, for example, a new “feature,” needed by axis, was added to the card at the last moment but somehow the firmware version that I have is one that precedes that? There is no way that I can assuredly make that diagnosis, nor eliminate the possibility. Otherwise, axis and the software upon which it uniquely depends remains the primary likely cause for the problem.

Because of the move I’ve been in a race against time. At this point it looks like I’ll assuredly lose. If I return the card, then, if things go well for the move (and if the card arrives on time), it will be packed in a box apart from my mill which will ship only partially assembled, and I’ll have to discover its location six months or more down the road when I’m ready to try to bring it up. Since my move is overseas, I’ll have to explain to the customs agent why I need yet another computer, this one 15 years old, because it’s the only one that has a PCI bus which I need to keep the mill functional until I can reintegrate it will the 7i96s. Making it work with my 5i25 PCI card is / will be harder than it seems because of the fact that I’ve had to repackage the mill in order to make it ready to move and I designed the package around the 7i96s. Hence, a rather intense motivation to get things right before I move.

You should know that I’m an electronics engineer, with 45+ years of experience, much of it managing others, and a good deal of it associated with writing software/firmware for medical devices. I know full well the impossibility of proving the negative, i.e., that there are no bugs, especially in systems as complex as LinuxCNC. I also am well familiar with the problem of having obstinate engineers who won’t investigate their own work to discover why things won’t work, even if the evidence points there. I’ve got about a 90% hit rate when I follow the evidence without prejudice. It’s been my experience that following the evidence is a much faster way getting to and fixing problems than any other way, and right now time is of the essence. If my style has been abrasive because of my insistence on it, I hope you’ll understand why.

Of course, that leaves the other 10% where I’m wrong, and this could yet be one of those cases. I’m open to other troubleshooting suggestions and other potential failure modes if you’ll let me know what they are and provide justification as to how they can induce the current behavior. If there are none, I guess I’ll return the card, take the hit, and hope for the best.

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

More
4 years 1 month ago - 4 years 1 month ago #252637 by rodw
I've just read through this thread and 2 things come to mind.

1. Do your steppers have holding torque when your system is powered up with axis open?
2. the Error finishing read you experienced.

if you don't have holding torque and can turn your motors by hand, Please disconnect the enable wires on the DM542 driver itself and try again.

Error finishing read is a more sinister issue that is  at the Linux kernel or NIC driver level outside of Linuxcnc. This is casued by excessive latency on the ethernet NIC and has been more prevalent with later OS distributions.  It happens when the ethernet latency exceeds the servo thread time period. Once an error finishing read ocurrs, the game is up and the mesa card is  fully disabled until a restart of linuxcnc. Its mostly associated with Realtek NICs such as are no doubt used on your N3160 USFF PC. I've used similar PCs for a long time and later Debian verions (10 and higher) are causing error finishing read on them now. Sharing the output from typing halcmd show param *tmax* would give some insight. (hope I got that command right). PCW has recently shared some GRUB command line tweaks that I have yet to try that may help.
Last edit: 4 years 1 month ago by rodw.

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

More
4 years 1 month ago #252643 by tommylight
A few things to try/test:
-in the ini file omit the backlash
-in the hal file omit this line for all joints: setp pid.y.maxerror 0.000500
-use the "show hal configuration" from the "machine" menu, on the right side choose the "show: tab, on the left pane navigate and find these pins:
-- pid.x.enable
-- pid.x.command
-- pid.x.feedback
-- pid.x.output
-- joint.0.amp-enable-out
-- hm2_7i96s.0.stepgen.00.enable
Monitor those while jogging the X axis, all the enables should be yellow, while the values for command, feedback, output should change depending on the velocity/position.

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

More
4 years 1 month ago #252773 by Todd Zuercher
It has been a long time since I've set up something with PNConfig. I thought it used to be that the stepper test did not use the enable signals. It was a common mistake that would catch people. They'd set up their stepper drives with the enable wire connected and it would work in the test, but it wouldn't work in Linuxcnc because the enable wire would disable the drive when Linuxcnc was started. It is common for the enable/disable signal on stepper drives to be enabled with nothing connected and disabled when connected. Be certain that the drives are in fact enabled when you are trying to jog them in Axis.

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

More
4 years 1 month ago #252788 by Dr. John
Many thanks to everyone who has responded to me on this forum, including PCW. Let me respond to the last three posts.

rodw: The problem is related to signals coming out of the 7i96s card. They are present when I use pncconf and absent when I use axis. I monitor them with an oscilloscope. FWIW, the mill is one that works just fine with my older computer and the 5i25 card. It's just that I need to discard to old computer (it's a 32 bit without life support) and I don't have any remaining that have a PCI (not PCIe) slot.

Todd: I am monitoring the electrical signals that come from the card. They are all at correct levels with pncconf, but there are no signals present with axis.

tommylight: Your response is hardest to respond to because they are good suggestions. However, I'm told by PCW that he's made my configuration work without difficulty at his facility, including with the .ini files that I sent him. I'm also skeptical that the basic axis code is a problem, but haven't been able to rule it out. However, that PCW can make it work with an otherwise identical configuration suggests that the odds of this are pretty low.

I thought it was probably something that I did in the way that I configured my machine and compiled the code that was the root cause, but that the problems traveled to different computers with different OS's suggests not.

It seems pretty clear that the communication paths between pncconf and the 7i96s and axis and the 7i96s are different, but probably not at the lower levels of the comms stack. So, there is still some potential problem in the differences between axis and pncconf, but in any case the card remains suspect.

Today is pack the mill day. So, I'm sending the card back to Mesa with the hopes that they can find the problem and send me something back that works as well for me as it does for them.

Thanks again for everyone's help.

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

More
4 years 4 weeks ago #253369 by Dr. John
OK, here's the latest. Mesa reports that the 7i96s card that I returned to them has no problems. It's pretty much as I expected, though, I confess, not as I had hoped. So the situation remains as follows:

- pncconf works; axis does not.
- this is the case on two separate computers, different hardware, different OS's.
- all of the indications are that network communications between the computer and the card is working fine: no dropped packets and all packets contain data in accordance with the protocol specified by Mesa, both for the axis and pncconf cases.

In other words, all indications point to a problem with axis, or something that is somewhat unique to me that affects axis. I think that, given that PCH has a system with my configuration files that works as expected with axis, the most probable cause is something that is unique to me, but that isn't related to the computing hardware or networking.

I'm no longer in the situation where I can troubleshoot with the mill, but I can still troubleshoot using an oscilloscope. The absence of signals coming from the I/O card while running axis is quite evident. Their presence when running pncconf is too. I'll be happy if we can make those signals appear when running axis.

A HUGE problem for me is understanding the communications stacks. They are apparently different between pncconf and axis. If anybody can help me with the details of this, from the point where the axis python code emits a command to where that command is sent via a UDP connection and every step in between, that will be immensely helpful. Likewise for pncconf. In this way I can begin by inserting traces in the respective comms stacks that help me identify where the communications fail.

Thanks again for your help.

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

Time to create page: 0.162 seconds
Powered by Kunena Forum