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: Re: MDrive - a novice in trouble
From: "James Rezende Piton" <[email protected]>
To: "[email protected]" <[email protected]>
Date: Fri, 12 Nov 2010 17:14:39 -0200
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


Replies:
Re: MDrive - a novice in trouble Ron Sluiter
RE: MDrive - a novice in trouble Mark Rivers
References:
MDrive - a novice in trouble James Rezende Piton
RE: MDrive - a novice in trouble Mark Rivers

Navigate by Date:
Prev: Patch to subArray record Michael Abbott
Next: Re: MDrive - a novice in trouble Ron Sluiter
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: MDrive - a novice in trouble Mark Rivers
Next: Re: MDrive - a novice in trouble Ron Sluiter
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, 12 Nov 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·