EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: motorSimSupport segfaults
From: "Pearson, Matthew R." <[email protected]>
To: Martin Konrad <[email protected]>
Cc: "[email protected]" <[email protected]>
Date: Wed, 26 Jun 2013 11:45:48 -0400
Hi,

The motor record needs to look something like:

record(motor,"mp49t:sim1")
{
        field(DESC,"sim")
        field(DTYP,"asynMotor")
        field(DIR,"0")
        field(VELO,"5")
        field(VBAS,"0")
        field(ACCL,"0.1")
        field(BDST,"0")
        field(BVEL,"0")
        field(BACC,"0")
        field(OUT,"@asyn(sim1,1)")
        field(MRES,"0.001")
        field(PREC,"3")
        field(EGU,"mm")
        field(DHLM,"50000000")
        field(DLLM,"-50000000")
        field(INIT,"")
        field(RTRY,"0")
        field(DLY,"0")   
        field(HVEL,"0")
        field(SREV, "200")
        field(RRES, "0")
        field(TWV, "1.0")
        field(ERES, "0")
        field(JAR, "0")
        field(UEIP, "0")
        field(URIP, "0")        
        field(RDBL, "")         
        field(VMAX, "5")
        field(OFF, "0")
        field(RDBD, "0")
        field(FOFF, "0")
        field(ADEL, "0.5")
        field(NTM, "YES")
        field(SDIS, "mp49t:sim1:SDIS.VAL") 
        info(autosaveFields_pass0, "DVAL OFF")
        info(autosaveFields, "DIR DHLM DLLM TWV VBAS VELO ACCL BDST BVEL BACC RDBD EGU RTRY UEIP URIP DLY PREC DISA DISP FOFF OFF FRAC OMSL JVEL JAR ADEL MDEL")
}


where sim1 is the Asyn port defined in the startup file, and DYTP is set to asynMotor. The motor part of the startup file looks like:


# Create simulated motors: ( start card , start axis , low limit, high limit, home posn, # cards, # axes to setup)
motorSimCreate( 0, 0, -150000000, 150000000, 0, 1, 32 )
# Setup the Asyn layer (portname, low-level driver drvet name, card, number of axes on card)
drvAsynMotorConfigure("sim1", "motorSim", 0, 32)



I'll send you a tar file of an example IOC I just built, and it works for me. 
Perhaps the sim example in the motor module needs cleaning up?


Cheers,
Matt


On Jun 26, 2013, at 10:42 AM, Martin Konrad <[email protected]> wrote:

> Hi Matthew,
>> I'm not too sure, but you might be trying to use non-asyn motor device support with an asyn based driver.
>> 
>> drvAsynMotorConfigure configures the Asyn motorSim driver. So the motor record needs to specify DTYP as asynMotor.
> Hmm, you might be right about that. To clean things up I started with a 
> fresh IOC and tried to followed the example from motorApp/MotorSimSrc. 
> See the attached file for my configuration. Unfortunately the problem 
> still occurs. There are no error messages on the IOC console before the 
> IOC crashes. I also managed to get some more debugging symbols:
> 
> #!../../bin/linux-x86_64-debug/motorSim
> ## You may have to change motorSim to something else
> ## everywhere it appears in this file
> #< envPaths
> ## Register all support components
> dbLoadDatabase("../../dbd/motorSim.dbd",0,0)
> motorSim_registerRecordDeviceDriver(pdbbase)
> ## Load record instances
> dbLoadRecords("../../db/motorSimTest.db","DEVICE=test")
> motorSimCreate( 0, 0, -22000, 42000, 10000, 1, 3, 5000 )
> Creating motor simulator: card: 0, axis: 0, hi: 42000, low -22000, home: 
> 10000, ncards: 1, naxis: 3
> [New Thread 0x7ffff7fc8700 (LWP 15089)]
> Created motor for card 0, signal 0 OK
> Created motor for card 0, signal 1 OK
> Created motor for card 0, signal 2 OK
> iocInit()
> [New Thread 0x7ffff7ec7700 (LWP 15090)]
> Starting iocInit
> ############################################################################
> ## EPICS R3.14.12.3 $Date: Mon 2012-12-17 14:11:47 -0600$
> ## EPICS Base built Mar 13 2013
> ############################################################################
> [New Thread 0x7ffff414e700 (LWP 15091)]
> [New Thread 0x7fffeffff700 (LWP 15092)]
> [New Thread 0x7fffefefe700 (LWP 15093)]
> [New Thread 0x7fffefcfd700 (LWP 15094)]
> [New Thread 0x7fffefafc700 (LWP 15095)]
> [New Thread 0x7fffef8fb700 (LWP 15096)]
> Set card 0, axis 0 high limit to 30000.000000
> 
> Program received signal SIGSEGV, Segmentation fault.
> 0x00007ffff6b0f930 in epicsRingPointerPush () from 
> /usr/lib/libCom.so.3.14.12.3
> (gdb) bt
> #0  0x00007ffff6b0f930 in epicsRingPointerPush () from 
> /usr/lib/libCom.so.3.14.12.3
> #1  0x00007ffff629f5e7 in scanOnce () from /usr/lib/libdbIoc.so.3.14.12.3
> #2  0x00007ffff7bd3224 in motor_callback (param=0x612220, 
> nReasons=<optimized out>, reasons=<optimized out>) at ../devMotorSim.c:125
> #3  0x00007ffff79c21d8 in paramCallCallback (params=0x60def0) at 
> ../paramLib.c:268
> #4  0x00007ffff7bd4c38 in motorAxisSetDouble (pAxis=0x613330, 
> function=<optimized out>, value=30000) at ../drvMotorSim.c:370
> #5  0x00007ffff79b528a in set_dial_highlimit (pmr=pmr@entry=0x612220, 
> pdset=pdset@entry=0x7ffff7dd9200 <devMotorSim>) at ../motorRecord.cc:3882
> #6  0x00007ffff79b9614 in init_record (arg=0x612220, pass=<optimized 
> out>) at ../motorRecord.cc:634
> #7  0x00007ffff737ac45 in iocBuild () from /usr/lib/libmiscIoc.so.3.14.12.3
> #8  0x00007ffff737af99 in iocInit () from /usr/lib/libmiscIoc.so.3.14.12.3
> #9  0x00007ffff6b1a824 in ?? () from /usr/lib/libCom.so.3.14.12.3
> #10 0x00000000004035f2 in main ()
> 
> Any help is greatly appreciated,
> 
> Martin
> 
> <IOC_customization.diff>



References:
motorSimSupport segfaults Konrad, Martin
Re: motorSimSupport segfaults Pearson, Matthew R.
Re: motorSimSupport segfaults Martin Konrad

Navigate by Date:
Prev: Re: motorSimSupport segfaults Ron Sluiter
Next: Re: motorSimSupport segfaults Konrad, Martin
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: motorSimSupport segfaults Ron Sluiter
Next: Re: motorSimSupport segfaults Konrad, Martin
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 20 Apr 2015 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·