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  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 
<== Date ==> <== Thread ==>

Subject: RE: Mclennan PM600 motor controller
From: Mark Rivers <rivers@cars.uchicago.edu>
To: Peter Linardakis <peter.linardakis@anu.edu.au>, "tech-talk@aps.anl.gov" <tech-talk@aps.anl.gov>
Date: Wed, 11 Dec 2013 05:04:04 +0000
Hi Peter,

I assume you are using the McLennan driver that is included in synApps/motor/motorApp/MclennanSrc/?

If so, then the problem is the DTYP field in the motor record in your database. You specified

    record(motor, "test:buncher:motor")  {
        field(DTYP, "asynMotor")

DTYP "asynMotor" is only for Model 2 and 3 motor drivers, where the communication between the motor record device support and the driver uses the standard asyn interfaces.

The Mclennan driver is an old Model 1 driver.  This is the correct definition of DTYP for the McLennan motors.

    record(motor, "test:buncher:motor") {
        field(DTYP, "Mclennan PM304")

You can find that required string ("Mclennan PM304") by looking in the DBD file your application is including:

        pitest_DBD += devMclennanMotor.dbd

That file, motorApp/MclennanSrc/devMclennanMotor.dbd, contains the following line:

        device(motor,VME_IO,devPM304,"Mclennan PM304")

That tells you what the device support string name is.

Cheers,
Mark


________________________________
From: tech-talk-bounces@aps.anl.gov [tech-talk-bounces@aps.anl.gov] on behalf of Peter Linardakis [peter.linardakis@anu.edu.au]
Sent: Tuesday, December 10, 2013 10:31 PM
To: tech-talk@aps.anl.gov
Subject: Mclennan PM600 motor controller

Greetings

I have progressed as far as I can with implementing an EPICS controlled motor through a Mclennan SimStep single axis stepper controller.  The IOC seg faults upon boot, with the output being:

#!../../bin/linux-arm/pitest
## You may have to change pitest to something else
## everywhere it appears in this file
< envPaths
epicsEnvSet("ARCH","linux-arm")
epicsEnvSet("IOC","iocpitest")
epicsEnvSet("TOP","/opt/epics/pitest")
epicsEnvSet("EPICS_BASE","/opt/epics/base")
epicsEnvSet("ASYN","/opt/epics/modules/asyn4-21")
epicsEnvSet("CALC","/opt/epics/modules/calc-3-2")
epicsEnvSet("MOTOR","/opt/epics/modules/motorR6-8")
## Register all support components
dbLoadDatabase("../../dbd/pitest.dbd",0,0)
pitest_registerRecordDeviceDriver(pdbbase)
## Load record instances
dbLoadRecords("../../db/sum.db","INST=pitest")
# Test SE (test-se1)
drvAsynIPPortConfigure("test-se1-1", "172.16.0.108:5300")
# Test for Mclennan PM600 stepper motor controller
# PM304Setup(controller count, poll rate (Hz))
# PM304Config(card being configured, asyn port name,  number of axes)
PM304Setup(1,5)
PM304Config(1, "test-se1-1", 1)
iocInit()
Starting iocInit
############################################################################
## EPICS R3.14.12.3 $Date: Mon 2012-12-17 14:11:47 -0600$
## EPICS Base built Aug 13 2013
############################################################################
2013/12/11 04:10:26.697 devMotorAsyn::init_record, test:buncher:motor find int32 interface failed
Segmentation fault


Points to note are:

·         The controller within the SimStep is a single PM600

·         I’m connecting to the SimStep via a Ethernet to serial adapter, through which I can successfully communicate to the PM600 using a telnet console

·         If the Ethernet to serial adapter is off during IOC boot, I still get the “interface failed”, but it doesn’t seg fault.

·         The SimSteps can be daisy chained to provide multi axis control, so more than one card can be addressed on the same port

The relevant sections of the application Makefile is:

…
# Include dbd files from all support applications:
#pitest_DBD += xxx.dbd

pitest_DBD += asyn.dbd
pitest_DBD += asynRecord.dbd
pitest_DBD += drvAsynIPPort.dbd

pitest_DBD += motorRecord.dbd
pitest_DBD += motorSupport.dbd
pitest_DBD += devMclennanMotor.dbd

# Add all the support libraries needed by this IOC
#pitest_LIBS += xxx
pitest_LIBS += asyn
pitest_LIBS += motor
pitest_LIBS += Mclennan

# pitest_registerRecordDeviceDriver.cpp derives from pitest.dbd
pitest_SRCS += pitest_registerRecordDeviceDriver.cpp
…


And the record database includes:

# Test record for Mclennan PM600 Stepper Motor driver
record(motor, "test:buncher:motor") {
  field(DTYP, "asynMotor")
  field(OUT, "@asyn(test-se1-1 1)")
  field(RRES, "1.0")
  field(PREC, "0")
  field(TWV, "10")
  field(VELO, "50")
}

I can see a few places where I might have gone wrong, but I don’t know exactly where.  HELP! :)

Regards
Peter

--
Dr Peter Linardakis
Accelerator Research and Development Engineer
Nuclear Physics | Research School of Physics and Engineering
Australian National University
e: peter.linardakis@anu.edu.au
p: (02) 6125 2862 f: (02) 6215 0748




Replies:
RE: Mclennan PM600 motor controller Peter Linardakis
References:
Mclennan PM600 motor controller Peter Linardakis

Navigate by Date:
Prev: Mclennan PM600 motor controller Peter Linardakis
Next: RE: pilatus detecotr modify FileName problem nick.rees
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 
Navigate by Thread:
Prev: Mclennan PM600 motor controller Peter Linardakis
Next: RE: Mclennan PM600 motor controller Peter Linardakis
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 
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 ·