Problems with 7i76e setup

More
31 Mar 2017 19:53 #90663 by deawe
I'm trying to setup a Mesa 7i76e card to run a cnc machine with stepper motors and have run into some problems.

What seems to be the first indication that something is wrong is that the CR1 /INIT LED lights up when i fire up linuxcnc. Another indication of problems is that I can toggle the LED pins through hal commands, but the pin states do not correspond to nor affect the state of the physical LED:s. The third indication is that I do not see any voltages on the DIR/STEP pins with a multimeter when running some test g-code (I would expect to see something at least on the DIR pin). I do not see any error messages anywhere, though. Perhaps I just don't look in the right place... To make it more interesting, the field I/O:s seem to work when manipulated through hal commands. To be fair, I only tested one output, but I could toggle that through hal commands and see a change in voltage on the physical output.

I'm not completely computer/electronics/programming illiterate, but since I don't see any errors anywhere, I'm having difficulties troubleshooting this. Can anyone provide some advice about where to start (continue) looking?

The setup is briefly explained below.

I installed the latest linuxcnc 2.7.8 on a desktop PC from the "stable" ISO. After that I installed the 3.2.0-4-rt-686-pae kernel and replaced the stock linuxcnc application with linuxcnc-2.7.8-71-g317a357 from the 2.7 rtpreempt buildbot repository. The ethernet connection to 7i76e is through the motherboard ethernet card, which is dedicated to the 7i76e. I changed the EEPROM IP of the 7i76e to 10.10.10.10 (could actually have been the default) and changed the jumpers for EEPROM IP. The IP of the PC is 10.10.10.1. After a power cycle of the 7i76e, only the logic and field power LED:s are lit. Doing a ping 10.10.10.10 causes the user LED:s CR3 - CR6 to do a "reverse" binary count corresponding to the ping requests.

The configuration was created through the Pncconf Wizard. When starting linuxcnc (without visible errors), the CR1 /INIT and all user LED:s turn on. I read somewhere that the CR1 /INIT LED could be an indication that the watchdog is not reset periodically. However, according to halshow, the hm2_7i76e.0.watchdog.has_bit pin is false.

I have not tried to update the 7i76e firmware. However, I did verify that the firmware matches 7i76e_7i76x1D.bit from freeby.mesanet.com/7i76e.zip with the mesaflash (--verify) application.

Any help or pointers would be highly appreciated! I can of course provide more information, but this post seems long enough as it is already.

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

More
31 Mar 2017 20:22 #90664 by PCW
Replied by PCW on topic Problems with 7i76e setup
Most of what you report sounds like standard 7I76E operation
The user LEDs count packets in the default setup,
( This is why they seem to be all on when you have a fast repetitive access )
They can be programmed (temporarily or permanently) to be HM2 status LEDs instead
if that is desired.

As to why the /INIT LED is on I do not know. On your firmware it indicates a protocol error
on newer firmware it indicates a protocol error _or_ watchdog timeout., but If you can toggle
field output bits, this means that the watchdog has not bitten.

Are running LinuxCNC 2.7.8? (the ISO is 2.7.0)

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

More
31 Mar 2017 21:33 #90667 by deawe
Replied by deawe on topic Problems with 7i76e setup
That was fast :)

If you say the ISO was 2.7.0, I believe you.

I'm running linuxcnc-uspace 2.7.8.71.g317a357. The output from linuxcnc_info is listed below:
This file can be posted to a web site like:
     http://pastebin.com
in order to provide information about the linuxcnc
system and configuration.

VIEWER=mousepad
                Date: Sat Apr 1 00:09:13 EEST 2017
            UTC Date: Fri Mar 31 21:09:13 UTC 2017
        this program: /usr/bin/linuxcnc_info
              uptime: 00:09:13 up 2 min, 1 user, load average: 1.01, 0.31, 0.11
     lsb_release -sa: Debian Debian GNU/Linux 7.11 (wheezy) 7.11 wheezy
      which linuxcnc: /usr/bin/linuxcnc
                 pwd: /home/dea
                USER: dea
             LOGNAME: dea
                HOME: /home/dea
              EDITOR: 
              VISUAL: 
            LANGUAGE: en_US:en
                TERM: xterm
           COLORTERM: Terminal
             DISPLAY: :0.0
        display size: 1280x1024 pixels (338x270 millimeters)

uname items:
         nodename -n: linuxcnc
      kernel-name -s: Linux
      kernel-vers -v: #1 SMP PREEMPT RT Debian 3.2.86-1
          machine -k: linuxcnc
        processor -p: unknown
         platform -i: unknown
      oper system -o: GNU/Linux

/proc items:
             cmdline: BOOT_IMAGE=/boot/vmlinuz-3.2.0-4-rt-686-pae root=UUID=2198db8f-3994-42a7-a495-4e348482a949 ro initrd=/install/gtk/initrd.gz lapic quiet rootdelay=5
          model name: Intel(R) Core(TM)2 CPU 4300 @ 1.80GHz
               cores: 2
             cpu MHz: 1200.000
             parport: e000-e002 : parport1 e003-e007 : parport1 ec00-ec02 : parport0
              serial: 03f8-03ff : serial

Varsions:
                 gcc: gcc (Debian 4.7.2-5) 4.7.2
              python: Python 2.7.3
                 git: git version 1.7.10.4
                 tcl: 8.5
                  tk: 8.5
               glade: not_in_PATH
          glade-gtk2: glade3 3.8.0

linuxcnc_var all:

     LINUXCNCVERSION: 2.7.8-71-g317a357
LINUXCNC_AUX_GLADEVCP: /usr/share/linuxcnc/aux_gladevcp
LINUXCNC_AUX_EXAMPLES: /usr/share/linuxcnc/aux_examples
            REALTIME: /etc/init.d/realtime
                 RTS: uspace
          HALLIB_DIR: /usr/share/linuxcnc/hallib

Could it be an issue caused by the buildbot "not quite" 2.7.8 linuxcnc version?

Is there any way to read any kind of debug information from the 7i76e when running linuxcnc? The default pins/parameters doesn't seem to contain any debug information that would help with this issue. Elsewhere, I also see references to dmesg and syslog, but 'dmesg' command gives no information related to linuxcnc and /var/log/syslog has only a few lines related to linuxcnc, which in my eyes don't seem related to the issue at hand.

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

More
31 Mar 2017 21:43 #90668 by PCW
Replied by PCW on topic Problems with 7i76e setup
Are you really sure there is any issue?
The fact that you can toggle Field I/O means that at
least the majority of things are working

Also the uspace version of LinuxCNC does not log errors to the kernel log
so you can just start LinuxCNC in a terminal and all the debug messages will be printed there

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

More
31 Mar 2017 22:13 #90669 by rodw
Replied by rodw on topic Problems with 7i76e setup
I've been through the same journey with my 7i76e. You need to reinstall Linux to get the premptive realtime kernel. If you read 7.1 in the installattion instructions
linuxcnc.org/docs/2.7/html/getting-start...etting-linuxcnc.html
It says to get the preemptive kernel, to start by installing a Debian release, not the LCNC ISO.

I tried Debian on my old 386 PC and found that the hardware was too slow and latency was far too high to be useable so I upgraded my PC to a Celeron J1900. Then several iterations of Wheezy and Precise which lacked driver support for modern hardware, I installed Linux Mint and never looked back.

There is now an excellent tutorial on how to install Mint, the preemptive realtime kernel and LinuxCNC.
forum.linuxcnc.org/9-installing-linuxcnc...-or-deb?limitstart=0

Don't waste anymore time, just go there and follow the steps...

I never needed to install any firmware on my 7i76e. Just that after you generate the config with pncconf, you will need to edit the hal file to make the board IP address 10.10.10.10. When you ping it in a terminal window, it should reply.....

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

More
01 Apr 2017 06:34 #90678 by deawe
Replied by deawe on topic Problems with 7i76e setup
PCW, I'm 100% sure that the /INIT LED is lit :) Thanks to your comment about "configuring" the user LED:s, I found the BUGS section in the hm2_eth manpage, which speaks about that. After running the 'elbpcom 01D914000000' command, I am indeed able to manipulate the state of the physical user LED:s through hal. So that is one less "problem" to worry about.

Could everything be working just fine even with the /INIT LED lit?

The real problem (if we consider a lit /INIT LED okay) is that I don't seem to get any STEP/DIR output signals. To make checking this a bit easier I made a simple gcode-file, where the three dots indicate that the two G1 commands are continued many times:
F120
G1 X6
G1 X0
...
I'm "watching" hm2_7i76e.0.stepgen.00.counts as I run the g-code file, and the count goes from 0 to 6000 (as close as I can tell), back to zero, and the repeats the cycle. With the "scale" set to 1000, that seems to make sense to me. In more human terms, the X-axis (nothing connected, though) is supposed to move in the positive direction for 5 seconds, the in the negative direction for 5 seconds, and then repeat the cycle. That should give me plenty of time to measure a change on the DIR pins with a multimeter. The DIR pins always show close to 0 V, though, with no changes in voltage detectable. Between the GND and +5V pins, I do measure a voltage of pretty much 5 V, if that is of any significance.

A new turn of events is that I don't see the field I/O anymore, and I don't think I have made any changes that should affect those. 12 V is supplied between the first VFIELD pin and GND (on the same connector), and W1 is in the left position, everything like it was before. There may have been some changes to the hal configuration, but no changes that should change the field I/O behavior was deliberately made.

rodw, thanks for the link and suggestion. I am, however, a bit reluctant to install a newer Debian release, since that introduces yet another variable that could go wrong. If I don't get anywhere with this, I will likely to a different host PC, and then I might try with for instance Ubuntu Precise, which appears to have linuxcnc buildbot packages for rt-preempt.

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

More
01 Apr 2017 09:05 #90680 by rodw
Replied by rodw on topic Problems with 7i76e setup
I still think your installed version of Linux is not correct for LinuxCNC and your ethernet card. You don't appear to have absorbed the bit about clause 7.1 in my earlier post.

Please post up the output when you type the following in a teminal window
uname -v

if it does not say PREEMPT RT in the output you have some work to do.The buildbot builds linuxcnc, not linux kernels...

Please let us know the outcome.

Also, have you actually connected a stepper yet? A volt meter may not tell you anything (unless it has a frequency counter).

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

More
01 Apr 2017 09:14 #90682 by deawe
Replied by deawe on topic Problems with 7i76e setup
The plot thickens.

I'm powering the 7i76e from a (chinese) lab power supply, and started thinking that just perhaps, the ripple level would be causing problems. To exclude that possibility, I thought I would try to power the card through the TB3 supply inputs. With that setup, the field power LED lights up, but the logic power LED does not.

The exact setup I have is +12 VDC applied to TB1 pin 1 and GND to TB1 pin 8. TB3 pin 21 is connected to TB1 pin 1 with a jumper wire, and TB3 pin 24 is connected to TB1 pin 8 in the same fashion. Jumper W1 is in the left position. An ethernet cable from the PC is connected to 7i76e. No other connections are present. According to the lab power supply, the supply current is ~20 mA.

Because the logic power LED did not turn on, I decided to do at least some simple troubleshooting. Looking at the board and IC markings, I figured that the two 3170A IC:s in the lower left corner of the board are the regulators (either one or both) for the 5V logic section. Looking at the datasheet for NCP3170 (might not be the right brand), pin 1 of the IC should be power ground and pin 2 should be input voltage. When the board is powered on like described above, there is no voltage on pin 2 on either of the 3170A IC:s, with reference to GND on TB1 pin 8.

Am I missing something that should probably be apparent, or should I start suspecting a defective board?

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

More
01 Apr 2017 09:20 #90683 by rodw
Replied by rodw on topic Problems with 7i76e setup
Sorry, I read your screen dump and you have the right kernel.

So the question remains is have you connected a stepper motor and driver to the 7i76e?
What stepper driver are you using?

My concern is that if you are just looking with a volt meter, you probably won't see any voltage output as the pulses are probably only around 2.5-3 milliseconds long so a multimeter won't see it.. (If it has frequency mode, it might show something). Also a misconfigured axis could be stepping super slowly. AS PCW stated, if the outputs and inputs are working, it is probably working OK.

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

More
01 Apr 2017 09:43 #90684 by deawe
Replied by deawe on topic Problems with 7i76e setup
We were apparently writing our replies simultaneously for the second time. Anyway here are some answers:

I am pretty much in line with clause 7.1 in your post. However, I did install Debian from the linuxcnc ISO image instead of from the official Debian source. I have installed and am using the PREEMPT kernel from the wheezy repositories, as confirmed by the below snippet:
dea@linuxcnc:~$ uname -v
#1 SMP PREEMPT RT Debian 3.2.86-1
dea@linuxcnc:~$ uname -a
Linux linuxcnc 3.2.0-4-rt-686-pae #1 SMP PREEMPT RT Debian 3.2.86-1 i686 GNU/Linux

I did also deviate from the 7.1 section in that I installed a buildbot version of linuxcnc instead of the latest one from the linuxcnc repository. For some reason I did not see that there were "official" releases for linuxcnc-uspace. I will change my linuxcnc installation to 2.7.8 from the official repository "linuxcnc.org/ wheezy base 2.7-uspace" and see it that makes any change for the better.

I have not connected a stepper driver yet. Should I not see a voltage on either of the DIR outputs when simulating a move in one direction on the corresponding axis? I understand that the STEP pins change state so rapidly that measuring the voltage on those will not give any conclusive answers. I do have a frequency input on my voltmeter and also a digital storage oscilloscope. But it seems to me that simply measuring the voltage on the DIR outputs is the least complicated way to check for any output signals at all on the stepper outputs.

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

Moderators: PCWjmelson
Time to create page: 0.461 seconds
Powered by Kunena Forum