I would enable all debugging on that serial line. In your startup script, right after drvAsynSerialPortConfigure:
asynSetTraceIOMask("L0",0,2)
asynSetTraceMask("LO",0,255)
Then you will see all of the communication to the device.
Mark
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of James Rezende Piton
Sent: Friday, November 12, 2010 1:15 PM
To: [email protected]
Subject: Re: MDrive - a novice in trouble
Hello, Mark
Thank you very much for the reply. I really appreciate your help.
As you told me, I moved back to the basic_asyn_motor.db and the proper C,S
values
for OUT. So the "syntax" error disappeared. dbDumpRecord shows now
the substitution for OUT:
(...)
grecord(motor,"IOC:m2") {
field(DESC,"motor 2")
field(DTYP,"MDrive")
field(VELO,"1")
(...)
field(OUT,"#C0 S1 @")
(...)
field(HVEL,"0.1")
}
But I still have the same result:
Illegal field value PV: IOC:m1 motor_init_record_com(): card does not
exist!
I checked:
epics> asynReport
L0 multiDevice:No canBlock:Yes autoConnect:Yes
Serial line /dev/ttyUSB0: Connected
L1 multiDevice:No canBlock:Yes autoConnect:Yes
Serial line /dev/ttyS0: Connected
I also dealt with Eos and asynOctetSetOutputEos and
asynOctetSetInputEos, just in case.
With asyn-4-13 testGpibSerial I can communicate and send commands
through the PV. For instance, I can get the parameter list produced
by the controller, showing it's ok.
As a novice, I played around a lot. I printed the variables card, brdcnt
and
brdptr->exists with that message about motor_init_record_com()
(in motorApp/MotorSrc/motordevCom.cc). I added a second serial port (and
its needed MDriveConfig) to see the corresponding change in the
number of boards:
Illegal field value PV: IOC:m1 motor_init_record_com(): card does not
exist! card =0 of 2 cards, existing= 0 (NO=0)
The problem is due to brdptr->exists, that is obviously false. But what
should I
do to have the "card" 0 available?
Have a nice weekend!
James
--
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
Just to recall:
==== my st.cmd:
< envPaths
epicsEnvSet("ARCH","linux-x86")
(...)
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)
dbLoadTemplate("motor.substitutions")
dbLoadRecords("/root/epics/synApps_5_5/support/motor-6-5/db/motorUtil.db",
"P=IOC:")
drvAsynSerialPortConfigure("L0","/dev/ttyUSB0",0,0,0)
drvAsynSerialPortConfigure("L1","/dev/ttyS0",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")
# IMS MDrive driver setup parameters:
# (1) maximum number of controllers in system
# (2) motor task polling rate (min=1Hz,max=60Hz)
MDriveSetup(2, 10)
# IMS MDrive driver configuration parameters:
# (1) controller# being configured,
# (2) ASYN port name
MDriveConfig(0, "L0")
MDriveConfig(1, "L1")
var drvMDrivedebug 4
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! card =0 of 2 cards, existing= 0 (NO=0)
asynOctetSetOutputEos("L0",-1,"\r\n")
asynOctetSetInputEos("L0",-1,"\n")
# motorUtil (allstop & alldone)
motorUtilInit("IOC:")
epics>
Em Thu, 11 Nov 2010 10:23:34 -0200, Mark Rivers <[email protected]>
escreveu:
> 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
- References:
- MDrive - a novice in trouble James Rezende Piton
- RE: MDrive - a novice in trouble Mark Rivers
- Re: MDrive - a novice in trouble James Rezende Piton
- Navigate by Date:
- Prev:
Re: Patch to subArray record Andrew Johnson
- Next:
RE: EPICS CA problems Mark Rivers
- 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:
Re: MDrive - a novice in trouble Ron Sluiter
- 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
|