On Fri, 28 Aug 2009, John Figie wrote:

Date: Fri, 28 Aug 2009 18:23:28 -0700 (PDT)
From: John Figie <zephyr9...@sbcglobal.net>
Reply-To: "Enhanced Machine Controller (EMC)"
    <emc-users@lists.sourceforge.net>
To: emc-users <emc-users@lists.sourceforge.net>
Subject: [Emc-users] m5i20 watchdog is biting

Hi,  I think I am real close to getting this to work but...

I am having 2 problems with emc2, I don't know if they are related but I 
suspect that they are:

1) I have created a test.hal file that I have been using without emc2 so that I can test 
my I/O, run servos open loop, and tune my PID gains.  This file runs fine except the 
first time I run it after a cold boot of the computer.  After a cold boot and loading the 
file into hal using "halrun -I -f test.hal" the watchdog.has.bit always starts 
as TRUE and the I/O does not work.  If I exit hal and then rerun the command everything 
is fine and I can control the I/O. Or, if I don't exit and just reset the bit in hal then 
everything is fine from that point on until I turn off  the computer.

2) I have made a m5i20.ini file for my machine and another hal file made from 
test.hal so that I can run emc2.  When I start emc2 using m5i20.ini the 
initialization seems to load the stuff in the hal file without errors but then 
has problems starting.  I get an error:
 "Invalid configuration of axes is preventing emc from starting"
 
 Looking at the dmesg output I see something about the watchdog.bit that 
Doesn't look good:
 [11773.532552] hm2_5i20.0: initialized AnyIO board at 0000:00:09.0
[11774.744518] hm2/hm2_5i20.0: Watchdog has bit! (set the .has-bit pin to False 
to resume)
[11893.995647] hm2/hm2_5i20.0: trying to recover from IO error or Watchdog bite
[11893.995653] hm2/hm2_5i20.0: error recover successful!
[11942.947460] hm2_5i20.0: dropping AnyIO board at 0000:00:09.0
[11942.947468] hm2/hm2_5i20.0: unregistered

I have tried a number of things to fix this but have been unsuccessful.

Part of my problem may be that I don't really completely understand what goes on in hal.  When I "addf 
hm2_5i20.0.pet_watchdog servo-thread" when does this actually start running periodically?  I am assuming 
after the "start" in hal, but even though I "setp hm2_5i20.0.watchdog.has_bit FALSE" just 
before the start, it still doesn't seem to work correctly.

I have placed the m5i20.ini at http://pastebin.ca/1546296
bridgeportS2I2.hal + dmesg output is http://www.pastebin.ca/1546441


Any help will be appreciated

John Figie


Doe you still have the problem is the watchdog is set for long time (say 1 second)?

With your 16 mS timeout, maybe the watchdog is biting before the initialization is complete.

Dont know what the driver does, but a good method for the driver would be to set the watchdog to a medium value (say 1 second during initialization) and then set it to the users selected value the first time its petted.

If the problem is getting bitten during initialization, this is really a driver issue, but there may be some clever HAL workaround to reset the watchdog timeout to a shorter value once the servo loop is running...


Peter Wallace
Mesa Electronics

(\__/)
(='.'=) This is Bunny. Copy and paste bunny into your
(")_(") signature to help him gain world domination.
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to