Experimental Physics and
| |||||||||||||||
|
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> =================================================================
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
| ||||||||||||||
ANJ, 11 Nov 2010 |
·
Home
·
News
·
About
·
Base
·
Modules
·
Extensions
·
Distributions
·
Download
·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing · |