Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  <19992000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  Index 1994  1995  1996  1997  1998  <19992000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020 
<== Date ==> <== Thread ==>

Subject: Re: Calling all Power PC EPICS sites
From: Timo Korhonen <timo.korhonen@psi.ch>
To: Andrew Johnson <anj@aps.anl.gov>
Cc: tech-talk <tech-talk@aps.anl.gov>
Date: Tue, 31 Aug 1999 09:27:27 +0200
Hi,

Andrew Johnson's message to Power PC sites prompted me to ask a question
which
has been nagging me a while but I have not yet had a chance to dig into it to
find the real answer.

We noticed a curious problem when porting the OMS58 motor control card
drivers to ppc.
(drvOms58, drvOmsCom from APS, Thomas Coleman is the current author,
I believe)
On a mv167 it worked fine, but when running on our ppc card (Motorola
mvme2306), the
motor position was not correctly read back.
The driver works by spawning a task (tmotor) which handles message traffic
and status queries.
After a couple days of confusion and a number of attempts I was able to track
down our problem to a point
where the motor task was supposed to call a routine that requests a data area
update (i.e. requests
the DSP on the oms58 card to report the current motor status).  This routine
was not called where it should
have been. The pointer to this subroutine is passed to the motor task in a
structure, and the subroutine
was declared as

STATIC void start_status(int card);

I removed the STATIC keyword, recompiled and the motor started to work. We
have been using it after that
and have so far not seen any problems.

I also had a similar problem with GPIB support (we are using the HPE2050 LAN
gateway support
from Benjamin Franksen at BESSY) when porting device support modules.  When I
removed the "static"
keyword in devGpib.h :
/*static*/ struct devGpibParmBlock devSupParms;
the drivers started to work. When declared static, the data that was supposed
to be in the structure was
not correctly passed from the init routine to the records.

These changes seemed to work, but does somebody have an explanation why?
On the other hand, this seems sort of logical because static variables are
valid only within a program
unit (according to my textbook), but why does this then work with a 68k cpu?

I will submit the full patches (diffs) if people agree that these changes
make sense. Or is there a better way to fix this problem?


Timo

--
Timo Korhonen  PSI (Paul Scherrer Institut), SLS
               CH-5232 Villigen PSI
               tel + 41- 56 3103262  fax + 41 - 56 310 4413
e-mail:        timo.korhonen@psi.ch


Replies:
Re: Calling all Power PC EPICS sites Benjamin Franksen
References:
Calling all Power PC EPICS sites Andrew Johnson

Navigate by Date:
Prev: Calling all Power PC EPICS sites Andrew Johnson
Next: Build problems Dave Reid
Index: 1994  1995  1996  1997  1998  <19992000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020 
Navigate by Thread:
Prev: Calling all Power PC EPICS sites Andrew Johnson
Next: Re: Calling all Power PC EPICS sites Benjamin Franksen
Index: 1994  1995  1996  1997  1998  <19992000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020 
ANJ, 10 Aug 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·