Hi James,
> 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
I think you are mixing up 2 types of asyn drivers.
The first is the asyn driver for the underlying serial port, which you configure with the drvAsynSerialPortConfigure command like you've done.
The second is using asyn as the interface to the motor driver itself. Newer motor drivers are written using this interface, but older drivers like the drvMDrive.cc are not. Thus, you should not have changed your motors.substitutions to use basic_asyn_motor.db, you must continue to use the C and S syntax, because the MDrive driver uses a VME_IO link specification.
In your st.cmd file you will need the line:
MDriveConfig(0, "L0")
This tells the driver to communicate with the device using asyn port L0
> Another question: why are there some examples with "grecord", instead of "record"?
That is historical from the days of a database configuration program called gdct. "grecord" meant "graphical record". It should be changed to "record" but it is not important.
Mark
________________________________
From: [email protected] on behalf of James Rezende Piton
Sent: Thu 11/11/2010 3:21 AM
To: [email protected]
Subject: MDrive - a novice in trouble
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 <http://www.lnls.br/>
- Replies:
- Re: MDrive - a novice in trouble James Rezende Piton
- References:
- MDrive - a novice in trouble James Rezende Piton
- Navigate by Date:
- Prev:
MDrive - a novice in trouble James Rezende Piton
- Next:
whether abvisable to use win32 to host EPICS development 王林
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
<2010>
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
MDrive - a novice in trouble James Rezende Piton
- Next:
Re: MDrive - a novice in trouble James Rezende Piton
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
<2010>
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
|