EPICS Home

Experimental Physics and Industrial Control System


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

Subject: Fwd: RE: MAXvConfig() error in st.cmd
From: Ron Sluiter <sluiter@aps.anl.gov>
To: Mark Rivers <rivers@cars.uchicago.edu>
Cc: EPICS <tech-talk@aps.anl.gov>
Date: Mon, 16 Jul 2012 12:26:54 -0500
Hello Mark,

Our communications went off-line.

Nia did find an error in the drvMAXv.cc code (the MAXvConfig declaration
is wrong) that, I believe, only shows up with the RTEMS shell. Not sure why.

I have checked the correction into the SVN repository here.

Ron


-------- Original Message --------
Subject: RE: MAXvConfig() error in st.cmd
Date: Fri, 13 Jul 2012 15:23:45 -0700
From: Fong, Nia W. <niafong@slac.stanford.edu>
To: Ron Sluiter <sluiter@aps.anl.gov>

I'm running a st.cmd file on RTEMS-beatnik.  


Nia Fong
Instrumentation & Controls Software
650-926-6215
niafong@slac.stanford.edu
________________________________________
From: Ron Sluiter [sluiter@aps.anl.gov]
Sent: Friday, July 13, 2012 2:38 PM
To: Fong, Nia W.
Subject: Re: MAXvConfig() error in st.cmd

Hello Nia,

You are right. The MAXvConfig declaration is wrong.
I not sure why the compiler did not catch this. Possibly,
because of the extern "C" { .

What shell are you using when you invoke MAXvConfig?

Thanks for catching this error.

Ron

On 7/13/2012 3:50 PM, Fong, Nia W. wrote:
> Hi Ron,
>
> I did a diff and this (https://subversion.xor.aps.anl.gov/synApps/motor/tags/R6-7-1/motorApp/OmsSrc/drvMAXv.cc) is the same file that I have.
>
> In this file, the function declaration only has 2 parameter, while the function definition has 3 parameters.  Shouldn't they match?
>
> ------------------------------------------------------------------
> MAXvConfig() function declaration with 2 parameters :
> ------------------------------------------------------------------
> /* Common local function declarations. */
> extern "C" {
> RTN_VALUES MAXvConfig(int, const char *);
> }
>
> ----------------------------------------------------------------
> MAXvConfig() function definition with 3 parameters :
> ----------------------------------------------------------------
> RTN_VALUES MAXvConfig(int card,                 /* number of card being configured */
>                        const char *initstr,      /* configuration string */
>                        int config)            /* initialization configuration */
> {
> ....
> }
>
>
>
> Thanks,
>
> Nia Fong
> Instrumentation&  Controls Software
> 650-926-6215
> niafong@slac.stanford.edu
> ________________________________________
> From: Ron Sluiter [sluiter@aps.anl.gov]
> Sent: Friday, July 13, 2012 12:29 PM
> To: Fong, Nia W.
> Subject: Re: MAXvConfig() error in st.cmd
>
> Hello Nia,
>
> This (the incorrect registration of MAXvConfig) was fixed
> with motor module R6-7-1. You can get a copy of drvMAXv.cc
> from R6-7-1 here<https://subversion.xor.aps.anl.gov/synApps/motor/tags/R6-7-1/motorApp/OmsSrc/drvMAXv.cc>.
>
> Ron
>
> On 7/13/2012 2:11 PM, Fong, Nia W. wrote:
>
> Hi,
>
> I just installed a new OMS MAXv VME card and was getting an error when calling MAXvConfig() in st.cmd :
>
>      MAXvSetup(1, 16, 0xF000, 200, 5, 10)
> 0x00000000 (0)
>      #config0="AX LH PSO"
>      MAXvConfig(0, "AX LH PSO", 0x00)
> Cexp syntax error: syntax error, unexpected '(', expecting '=' or '\n'
>
> Passing 2 parameters returned the same error :
>
>      MAXvSetup(1, 16, 0xF000, 200, 5, 10)
> 0x00000000 (0)
>      #config0="AX LH PSO"
>      MAXvConfig(0, "AX LH PSO")
> Cexp syntax error: syntax error, unexpected '(', expecting '=' or '\n'
>
> It looks like MAXvConfig() expects three parameters in the rest of the code, but it's function definition only defines 2 in drvMAXv.cc.
>
> I recompiled with the small change and no longer get the error.  However, I'm just setting everything up first the first time and don't yet have a motor connected so am not sure if this is the correct fix.  Could anyone with more experience provide more insight?
>
> All jumpers are default factory settings except for J13.
> Jumper J13 is set for A16 supervisory access (0x2D or 101101)
>
> --------------------------
> Original drvMAXv.cc:
> --------------------------
> /* Common local function declarations. */
> extern "C" {
> RTN_STATUS MAXvSetup(int, int, unsigned int, unsigned int, int, int);
> RTN_VALUES MAXvConfig(int, const char *);
> }
>
> ---------------------------
> Modified drvMAXv.cc:
> ---------------------------
> /* Common local function declarations. */
> extern "C" {
> RTN_STATUS MAXvSetup(int, int, unsigned int, unsigned int, int, int);
> RTN_VALUES MAXvConfig(int, const char *, int);
> }
>
>
> Thanks,
> Nia
>

Navigate by Date:
Prev: RE: asynPortDriver Mark Rivers
Next: RE: asynManager isConnected matthew.pearson
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019  2020 
Navigate by Thread:
Prev: RE: MAXvConfig() error in st.cmd Mark Rivers
Next: Is there EPICS Device Support for SRS830 ( 100 kHz DSP lock-in amplifier) out there? Williams Jr., Ernest L.
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019  2020