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  <20102011  2012  2013  2014  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  <20102011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: MDrive - a novice in trouble
From: "James Rezende Piton" <[email protected]>
To: [email protected]
Date: Thu, 11 Nov 2010 07:21:56 -0200
Hello,

I am trying to adapt the motorExApp,
under motor-6-5, to try a MDrive motor
under EPICS.

I (un)commented the proper lines (I think
so) and got the binaries.

I chose basic_asyn_motor.db as my base.
I changed a line in the original
motor.substitutions - instead of C and
S (card/slot), I created PORT and ADDR, following
the basic_asyn_motor model, with L0 and 2 (the axis address
recorded and tested in my motor controller).

======== motor.substitutions ==========
file "$(MOTOR)/db/basic_asyn_motor.db"
{
pattern
{P, N, M, DTYP, PORT, ADDR, DESC, EGU, DIR, VELO, VBAS, ACCL, BDST, BVEL, BACC, MRES, PREC, DHLM, DLLM, INIT}
{IOC:, 1, "m$(N)", "MDrive", L0, 2, "motor $(N)", degrees, Pos, 1, .1, .2, 0, 1, .2, 0.01, 5, 100, -100, ""}
}


======= basic_asyn_motor.db ========================

record(motor,"$(P)$(M)")
{
	field(DESC,"$(DESC)")
	field(DTYP,"$(DTYP)")
	field(DIR,"$(DIR)")
	field(VELO,"$(VELO)")
	field(VBAS,"$(VBAS)")
	field(ACCL,"$(ACCL)")
	field(BDST,"$(BDST)")
	field(BVEL,"$(BVEL)")
	field(BACC,"$(BACC)")
	field(OUT,"@asyn(\"$(PORT)\",$(ADDR))")
	field(MRES,"$(MRES)")
	field(PREC,"$(PREC)")
	field(EGU,"$(EGU)")
	field(DHLM,"$(DHLM)")
	field(DLLM,"$(DLLM)")
	field(INIT,"$(INIT)")
	field(TWV,"1")
}



My st.cmd.unix was correspondingly modified to
configure the USB-serial adapter and with

MDriveSetup(1, 10)

and

MDriveConfig(0, "L0")

Then I start IOC

[iocWithAsyn]# ../../bin/linux-x86/WithAsyn st.cmd.unix


=======================================


< envPaths

epicsEnvSet("ARCH","linux-x86")
epicsEnvSet("IOC","iocWithAsyn")
epicsEnvSet("TOP","/root/epics/synApps_5_5/support/motor-6-5")
epicsEnvSet("SUPPORT","/root/epics/synApps_5_5/support")
epicsEnvSet("ASYN","/root/epics/synApps_5_5/support/asyn-4-13")
epicsEnvSet("EPICS_BASE","/root/epics/synApps_5_5/support/../../base")
epicsEnvSet("IPAC","/root/epics/synApps_5_5/support/ipac-2-11")
epicsEnvSet("MOTOR","/root/epics/synApps_5_5/support/motor-6-5")
dbLoadDatabase("/root/epics/synApps_5_5/support/motor-6-5/dbd/WithAsyn.dbd")
WithAsyn_registerRecordDeviceDriver(pdbbase)

drvAsynSerialPortConfigure("L0","/dev/ttyUSB0",0,0,0)
asynSetOption("L0", -1, "baud", "9600")
asynSetOption("L0", -1, "bits", "8")
asynSetOption("L0", -1, "parity", "none")
asynSetOption("L0", -1, "stop", "1")
asynSetOption("L0", -1, "clocal", "Y")
asynSetOption("L0", -1, "crtscts", "N")

dbLoadTemplate("motor.substitutions")

Can't set "IOC:m1.OUT" to "@asyn("L0",2)"
Error at or before ")" in file "/root/epics/synApps_5_5/support/motor-6-5/db/basic_asyn_motor.db" line 12


dbLoadRecords("/root/epics/synApps_5_5/support/motor-6-5/db/motorUtil.db", "P=IOC:")

iocInit
Starting iocInit
############################################################################
## EPICS R3.14.11 $R3-14-11$ $2009/08/28 18:47:36$
## EPICS Base built Sep 8 2010
############################################################################
Illegal field value PV: IOC:m1 motor_init_record_com(): card does not exist!


iocRun: All initialization complete
# motorUtil (allstop & alldone)
motorUtilInit("IOC:")
epics>


=================================================================



I am not sure about the right asyn syntax, but why that ``Can't set "IOC:m1.OUT" to "@asyn("L0", 2)"'' at all?

My USB adapter works and so does the motor communicate,
tested in the same SL system.

Thanks in advance for any tip!

Another question: why are there some examples with "grecord",
instead of "record"?


Regards,


--
James Rezende Piton
grupo SOL
(Software de OperaÃÃo das Linhas de Luz)

LaboratÃrio Nacional de Luz SÃncrotron â CNPEM/ABTLuS
+ 55(19) 3512 1228
BRAZIL

[email protected]
http://www.lnls.br


Replies:
RE: MDrive - a novice in trouble Mark Rivers

Navigate by Date:
Prev: Re: EPICS Suggestions and Priorities Maren Purves
Next: RE: MDrive - a novice in trouble Mark Rivers
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  <20102011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: RE: EPICS integration of streak camera, fast-gated camera Hu, Yong
Next: RE: MDrive - a novice in trouble Mark Rivers
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  <20102011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 11 Nov 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·