Experimental Physics and Industrial Control System
Please send the complete output when you start the IOC.
After the IOC boots type this command at the iocsh prompt:
asynReport 1
I assume this file is your driver, derived from asynPortDriver:
SHINE_SRCS += SHINE.cpp
Does it define the SHINEConfigure iocsh command?
Do you get an error after this line when you start the IOC:
SHINEConfigure("testAPD", 1000)
Mark
________________________________
From: Tech-talk <tech-talk-bounces at aps.anl.gov> on behalf of 周逸媚 via Tech-talk <tech-talk at aps.anl.gov>
Sent: Tuesday, June 4, 2024 5:45 AM
To: tech-talk at aps.anl.gov <tech-talk at aps.anl.gov>
Subject: an IOC based on asynPortDriver
Dear Sir,
I have an IOC based on asynPortDriver.
the st.cmd is:
--------------------------------------------------
cd "${TOP}"
dbLoadDatabase "dbd/SHINE.dbd"
SHINE_registerRecordDeviceDriver pdbbase
SHINEConfigure("testAPD", 1000)
dbLoadRecords("db/SHINE.db","P=SHINE-BI:,R=,PORT=testAPD,ADDR=0,TIMEOUT=10000")
#dbLoadRecords("db/asynRecord.db","P=SHINE-BI:,R=,PORT=testAPD,ADDR=0,OMAX=,IMAX=")
########## AUTOSAVE ##########
set_requestfile_path(".")
set_savefile_path("/home/EPICS/","autosave")
save_restoreSet_IncompleteSetsOk(1)
save_restoreSet_DatedBackupFiles(0)
set_pass0_restoreFile("shineioc.sav")
###########################
cd "${TOP}/iocBoot/${IOC}"
iocInit
create_monitor_set("shineioc.req",10,"P=SHINE-BI:")
-------------------------------------------------
When I start the IOC, all PVs display an error message such as:
devAsynFloat64::initCommon connectDevice failed asynManager:connectDevice port testAPD not found
devAsynInt32::initCommon connectDevice failed asynManager:connectDevice port testAPD not found
Then, when I caget their values, they are all 0.
For example:
record(ai, "$(P)$(R)BPM_X")
{
field(DTYP, "asynFloat64")
field(INP, "@asyn($(PORT),$(ADDR),$(TIMEOUT))BPM_X")
field(SCAN, "I/O Intr")
}
+dbpr, the message is:
AMSG: ASG : DESC: DISA: 0
DISV: 1 NAME: SHINE-BI:BPM_X NAMSG:
RVAL: 0 SEVR: INVALID STAT: UDF SVAL: 0
TPRO: 0 VAL : 0
Is there a file missing during compilation?
-----------------------------------------
TOP=../..
include $(TOP)/configure/CONFIG
#----------------------------------------
# ADD MACRO DEFINITIONS BELOW HERE
# Use typed rset structure (see 3.16.1 release notes)
USR_CPPFLAGS += -DUSE_TYPED_RSET
# xxxRecord.h will be created from xxxRecord.dbd
DBDINC += xxxRecord
# Install xxxSupport.dbd into <top>/dbd
DBD += xxxSupport.dbd
# Build an IOC support library
LIBRARY_IOC += SHINESupport
########### ZYM ##############
#LIBRARY_IOC += SHINE
SHINE_SRCS += SHINE.cpp
SHINE_LIBS += asyn
SHINE_LIBS += autosave
SHINE_DBD += asSupport.dbd
################################
# Compile and add code to the support library
SHINESupport_SRCS += xxxRecord.c
SHINESupport_SRCS += devXxxSoft.c
# Link locally-provided code into the support library,
# rather than directly into the IOC application, that
# causes problems on Windows DLL builds
SHINESupport_SRCS += dbSubExample.c
SHINESupport_SRCS += devSHINEVersion.c
SHINESupport_SRCS += SHINEHello.c
SHINESupport_SRCS += initTrace.c
SHINESupport_LIBS += $(EPICS_BASE_IOC_LIBS)
# Auto-generate a header file containing a version string.
# Version comes from the VCS if available, else date+time.
GENVERSION = SHINEVersion.h
# Macro name
GENVERSIONMACRO = SHINEVERSION
# Build the IOC application
PROD_IOC = SHINE
# SHINE.dbd will be created and installed
DBD += SHINE.dbd
# SHINE.dbd will include these files:
SHINE_DBD += base.dbd
SHINE_DBD += xxxSupport.dbd
SHINE_DBD += dbSubExample.dbd
SHINE_DBD += devSHINEVersion.dbd
SHINE_DBD += SHINEHello.dbd
SHINE_DBD += initTrace.dbd
# SHINE_registerRecordDeviceDriver.cpp derives from SHINE.dbd
SHINE_SRCS += SHINE_registerRecordDeviceDriver.cpp
# Build the main IOC entry point where needed
SHINE_SRCS_DEFAULT += SHINEMain.cpp
SHINE_SRCS_vxWorks += -nil-
# Link in the code from our support library
SHINE_LIBS += SHINESupport
######### ZYM #########
SHINE_LIBS += asyn autosave
#######################
# To build SNL programs, SNCSEQ must be defined
# in the <top>/configure/RELEASE file
ifneq ($(SNCSEQ),)
# Build sncExample into SHINESupport
sncExample_SNCFLAGS += +r
SHINE_DBD += sncExample.dbd
# A .stt sequence program is *not* pre-processed:
SHINESupport_SRCS += sncExample.stt
SHINESupport_LIBS += seq pv
SHINE_LIBS += seq pv
# Build sncProgram as a standalone program
PROD_HOST += sncProgram
sncProgram_SNCFLAGS += +m
# A .st sequence program *is* pre-processed:
sncProgram_SRCS += sncProgram.st
sncProgram_LIBS += seq pv
sncProgram_LIBS += $(EPICS_BASE_HOST_LIBS)
endif
# Link QSRV (pvAccess Server) if available
ifdef EPICS_QSRV_MAJOR_VERSION
SHINE_LIBS += qsrv
SHINE_LIBS += $(EPICS_BASE_PVA_CORE_LIBS)
SHINE_DBD += PVAServerRegister.dbd
SHINE_DBD += qsrv.dbd
endif
# Finally link IOC to the EPICS Base libraries
SHINE_LIBS += $(EPICS_BASE_IOC_LIBS)
include $(TOP)/configure/RULES
#----------------------------------------
# ADD EXTRA GNUMAKE RULES BELOW HERE
# Explicit dependency needed for generated header file
devSHINEVersion$(DEP): $(COMMON_DIR)/$(GENVERSION)
Best regards,
Yimei Zhou
- References:
- an IOC based on asynPortDriver 周逸媚 via Tech-talk
- Navigate by Date:
- Prev:
Re: Required Perl modules? John Dobbins via Tech-talk
- Next:
ca/pva access doesnt handle DNS adressing correctly? Andrea michelotti 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>
- Navigate by Thread:
- Prev:
an IOC based on asynPortDriver 周逸媚 via Tech-talk
- Next:
ca/pva access doesnt handle DNS adressing correctly? Andrea michelotti 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>