EPICS Home

Experimental Physics and Industrial Control System


 
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  <2025 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  <2025
<== Date ==> <== Thread ==>

Subject: RE: Problem with drvAsynIPPortConfigure
From: Mark Rivers via Tech-talk <tech-talk at aps.anl.gov>
To: Dariush Hampai <dariush.hampai at lnf.infn.it>, "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>
Date: Thu, 18 Sep 2025 15:37:46 +0000
Hi Dariush,

I think you have the order of your dbd files wrong.  They should be in this order:

mdrive_1IOC_DBD += asyn.dbd
mdrive_1IOC_DBD += drvAsynIPPort.dbd
mdrive_1IOC_DBD += stream-base.dbd

Is stream-base.dbd part of the StreamDevice module, or is that something local to your site?  The files you listed did not include base.dbd, which should come first.  So I think it should really be:

mdrive_1IOC_DBD += base.dbd
mdrive_1IOC_DBD += asyn.dbd
mdrive_1IOC_DBD += drvAsynIPPort.dbd
mdrive_1IOC_DBD += stream.dbd

Mark


-----Original Message-----
From: Dariush Hampai <dariush.hampai at lnf.infn.it> 
Sent: Thursday, September 18, 2025 10:21 AM
To: tech-talk at aps.anl.gov; Mark Rivers <rivers at cars.uchicago.edu>
Subject: Problem with drvAsynIPPortConfigure

hi Community,
I'm writing an IOC for industrial motor driver:
I prepare the IOC, in particular:
1) in the configure/RELASE there is
SUPPORT=$(EPICS_BASE)/synApps_6_3/support
ASYN=$(SUPPORT)/asyn-R4-44-2
STREAM=$(SUPPORT)/StreamDevice-2-8-24
EPICS_BASE = /home/xlabsrv2/epics

2) in the mdrive_1IOC/src/Makefile there is mdrive_1IOC_DBD += stream-base.dbd mdrive_1IOC_DBD += drvAsynIPPort.dbd mdrive_1IOC_DBD += asyn.dbd

mdrive_1IOC_LIBS += stream
mdrive_1IOC_LIBS += asyn

3) in the mdrive_1IOC/Db/Makefile there is DB += mdrive_1IOC.proto DB += mdrive_1IOC.db DB += mdrive_1IOC.val

4) in the mdrive_1IOC/Db/mdrive_1IOC.val there is file db/mdrive_1IOC.db {
     pattern { card, axis, ASYNPORT, MOT, EGU, homing, MRES, direct }
         { 1, 1 , "ip_x", "mdrive_x", mm, 1, 411, + } }

5) in the st.cmd there is
epicsEnvSet ("STREAM_PROTOCOL_PATH", "${TOP}/db") epicsEnvSet ("PORT_mdrive_x", "ip_x")

drvAsynIPPortConfigure($(PORT_mdrive_x), "100.100.0.23:503")
asynOctetSetInputEos($(PORT_mdrive_x),0,"\n\r")
asynOctetSetOutputEos($(PORT_mdrive_x),0,"\n\r")

asynSetTraceMask($(PORT_mdrive_x),-1,0x9);
asynSetTraceIOMask($(PORT_mdrive_x),-1,0x2)


These are the configurations. After make (all is ok), executing the st.cmd I receive the following error

[xlabsrv2@xlabsrv2 iocmdrive_1IOC]$ ./st.cmd #!../../bin/linux-x86_64/mdrive_1IOC
< envPaths
epicsEnvSet("IOC","iocmdrive_1IOC")
epicsEnvSet("TOP","/home/xlabsrv2/epics/IOCs/mdrive_1IOC")
epicsEnvSet("SUPPORT","/home/xlabsrv2/epics/synApps_6_3/support")
epicsEnvSet("ASYN","/home/xlabsrv2/epics/synApps_6_3/support/asyn-R4-44-2")
epicsEnvSet("STREAM","/home/xlabsrv2/epics/synApps_6_3/support/StreamDevice-2-8-24")
epicsEnvSet("EPICS_BASE","/home/xlabsrv2/epics")
cd "/home/xlabsrv2/epics/IOCs/mdrive_1IOC"
epicsEnvSet ("STREAM_PROTOCOL_PATH",
"/home/xlabsrv2/epics/IOCs/mdrive_1IOC/db")
epicsEnvSet ("PORT_mdrive_x", "ip_x")
#X Axis
drvAsynIPPortConfigure(ip_x, "100.100.0.23:503") ERROR st.cmd line 36: Command drvAsynIPPortConfigure not found.
asynOctetSetInputEos(ip_x,0,"\n\r")
ERROR st.cmd line 37: Command asynOctetSetInputEos not found.
asynOctetSetOutputEos(ip_x,0,"\n\r")
ERROR st.cmd line 38: Command asynOctetSetOutputEos not found.
asynSetTraceMask(ip_x,-1,0x9);
ERROR st.cmd line 40: Command asynSetTraceMask not found.
asynSetTraceIOMask(ip_x,-1,0x2)
ERROR st.cmd line 41: Command asynSetTraceIOMask not found.
## Register all support components
dbLoadDatabase "dbd/mdrive_1IOC.dbd"
mdrive_1IOC_registerRecordDeviceDriver pdbbase ## Load record instances
#dbLoadRecords("db/mdrive_1IOC.db","user=xlabsrv2")
dbLoadTemplate("db/mdrive_1IOC.val")
dbLoadTemplate: Too many values given, line 14.
cd "/home/xlabsrv2/epics/IOCs/mdrive_1IOC/iocBoot/iocmdrive_1IOC"
iocInit
Starting iocInit
############################################################################
## EPICS R7.0.8.2-DEV
## Rev. R7.0.8.1-142-g144f9756eac4e800f18d
## Rev. Date Git: 2025-02-05 10:16:16 -0600 ############################################################################
2025/09/18 16:04:01.785392 _main_ Cannot find a bus named 'ip_x' for 'mdrive_x:model'
2025/09/18 16:04:01.785498 _main_ mdrive_x:model: Can't attach to bus ip_x 0
2025/09/18 16:04:01.785517 _main_ mdrive_x:model: Record initialization failed
iocRun: All initialization complete
## Start any sequence programs
#seq sncxxx,"user=xlabsrv2"
epics>



searching in previous threads I found missing the "drvAsynIPPort.dbd" in src/Makefile, but I already put it. Moreover I use "make clean all", and (to be sure) in this case I also remove db, dbd, and lib folders to restart with a clean make

where ma I wrong?
thank you in advance!!!

Dariush

p.s.: all other IOCs using drvAsynIPPortConfigure working properly...

--
************************************

Dr. Dariush Hampai, PhD

INFN - LNF
X-Lab Frascati
Via E. Fermi, 54 (ex 40)
I-00044 Frascati (RM)
Italy

Mail Address:
XLab-Frascati
LNF-INFN
Casella Postale 13
Frascati (RM)
Italy

Room:	+39.06.9403.5248
Lab.:	+39.06.9403.2286
Mob.:	+39.06.9403.8025
Fax.:	+39.06.9403.2597

************************************



Replies:
Re: Problem with drvAsynIPPortConfigure Dariush Hampai via Tech-talk
Re: Problem with drvAsynIPPortConfigure Henrique F. Simoes via Tech-talk
References:
Problem with drvAsynIPPortConfigure Dariush Hampai via Tech-talk

Navigate by Date:
Prev: Problem with drvAsynIPPortConfigure Dariush Hampai via Tech-talk
Next: Re: Problem with drvAsynIPPortConfigure Dariush Hampai via Tech-talk
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  <2025
Navigate by Thread:
Prev: Problem with drvAsynIPPortConfigure Dariush Hampai via Tech-talk
Next: Re: Problem with drvAsynIPPortConfigure Dariush Hampai via Tech-talk
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  <2025