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  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: Mclennan PM600 motor controller
From: Mark Rivers <[email protected]>
To: Peter Linardakis <[email protected]>, "[email protected]" <[email protected]>
Date: Thu, 12 Dec 2013 06:54:37 +0000
Hi Peter,

You are loading a local .db file, sum.db.  I don't know what that files contains.  But it clearly is setting the .OUT field of the motor record to the string "@asyn(test-se1-1, 0)".

That is not correct, again because you are not using asyn device support for the motor record.  You need to set the .OUT field of the motor record to a string like the following:

        field(OUT,"#C0 S0 @")
 
C0 means "card 0", i.e. the first PM304 card in the system.  S0 means signal 0, i.e. the first axis on this controller.  That is the syntax used by all Model 1 motor drivers.

I think you are basing your database on asyn_motor.db.  That database can only be used for Model 2 and Model 3 drivers.  For Model 1 drivers like the one you are using you must use motor.db, not asyn_motor.db.

Mark



________________________________________
From: Peter Linardakis [[email protected]]
Sent: Wednesday, December 11, 2013 10:24 PM
To: Mark Rivers; [email protected]
Subject: RE: Mclennan PM600 motor controller

Hi Mark

Thank you very much for the assistance.  As you may have gathered, EPICS is not a full time task for me, so assistance is much appreciated.

Indeed I am using the Mclennan driver.  Your direction allowed me to progress greatly, but I am at another stumbling block.  I have managed to communicate and move the motor through an asynRecord device by simply connecting to port "test-se-1" and address "0".  The .OEOS field must be set to "\r\n" for the commands to actually be acted upon (otherwise it just reads back the input command).  However, when I try connecting through a motor record, I get the trace below on IOC start up:

...
# Test SE (test-se1)
drvAsynIPPortConfigure("test-se1-1", "172.16.0.108:5300")
# Add these lines for asynTrace debugging
asynSetTraceIOMask("test-se1-1",0,2)
asynSetTraceMask("test-se1-1",0,9)
# 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)
## Load record instances
dbLoadRecords("../../db/sum.db","INST=pitest")
Can't set "test:buncher:motor.OUT" to "@asyn(test-se1-1, 0)"
Error at or before ")" in file "../../db/sum.db" line 34
iocInit()
Starting iocInit
############################################################################
## EPICS R3.14.12.3 $Date: Mon 2012-12-17 14:11:47 -0600$
## EPICS Base built Aug 13 2013
############################################################################
Illegal field value PV: test:buncher:motor motor_init_record_com(): card does not exist!

I'm aware the last line means there is a communication issue, but I have no idea about the "Can't set to @asyn" line.  I assume from asyn_motor.db that that is correct format for that field.  In any case, I have tried a few different ways, but no dice.

The full db record is:

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

Regards
Peter

-----Original Message-----
From: Mark Rivers [mailto:[email protected]]
Sent: Wednesday, 11 December 2013 4:04 PM
To: Peter Linardakis; [email protected]
Subject: RE: Mclennan PM600 motor controller

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

References:
Mclennan PM600 motor controller Peter Linardakis
RE: Mclennan PM600 motor controller Mark Rivers
RE: Mclennan PM600 motor controller Peter Linardakis

Navigate by Date:
Prev: RE: Mclennan PM600 motor controller Peter Linardakis
Next: Re: pilatus detecotr modify FileName problem Bruce Hill
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: Mclennan PM600 motor controller Peter Linardakis
Next: RE: Mclennan PM600 motor controller 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  2020  2021  2022  2023  2024