Hello Xiaomin,
You cannot read a string into an 'ai' record. That record is for floating point numbers.
Try a 'stringin' record instead.
Dirk
On Tue, 2022-03-08 at 16:29 +0800, liuxiaomin via Tech-talk wrote:
> Hi Mark,
>
> Thank you for helping me solve the previous problem.
> I want to execute a *IDN? command which returns the instrument’s identification string,
>
> The db files is as follows:
>
> record(ai, "$(user):xh") {
> field(DTYP, "stream")
> field(SCAN, "1 second")
> field(INP, "@sd.proto DEVICENAME CAT1")
> }
>
> The proto files is as follows:
>
>
> DEVICENAME{
> out "*IDN?";
> in "%s";
> }
>
> When I execute the st.cmd file,it shows no error, but when I type caget, it shows 0.I think it should returns a string
> with the following format: Agilent Technologies,53230A,MY58060118,02.09-1731.8935-1.19-4.16-127-159-35. The
> description of the command of *IDN? is in the attachment.
>
> How can I solve this problem?
>
> Thanks,
> Xiaomin
>
>
>
>
>
>
>
>
>
> 发件人: Mark Rivers
> 发送时间: 2022年3月3日 10:28
> 收件人: tech-talk at aps.anl.gov; 刘晓敏
> 主题: Re: StreamDevice
>
> Hi Xiaomin,
>
> I am confused. You have this which implies that the external device for stream is at IP address 169.254.2.30
>
> drvAsynIPPortConfigure("CAT1","169.254.2.30:5025",0,0,1)
>
> But your IOC has this:
> EPICS_CA_ADDR_LIST: 169.254.2.30:5068
>
> Your client host has this:
> EPICS_CA_ADDR_LIST=169.254.2.30:5068
>
> So your IOC, client machine, and external device all have the same IP address?
>
> If this is correct, then your EPICS IOC and the EPICS client (caget) are on the same subnet. Then just don't define
> EPICS_CA_ADDR_LIST or EPICS_CA_AUTO_ADDR_LIST. It should find the PV fine.
>
> Mark
>
>
>
>
>
> From: Tech-talk <tech-talk-bounces at aps.anl.gov> on behalf of 刘晓敏 via Tech-talk <tech-talk at aps.anl.gov>
> Sent: Wednesday, March 2, 2022 7:59 PM
> To: tech-talk at aps.anl.gov <tech-talk at aps.anl.gov>
> Subject: StreamDevice
>
> Hi,
> I am trying to use StreamDevice on debian system to control device, the device is universal frequency counter/timer.
> When I execute the st.cmd file,it shows no error, but when I type caget, it shows pv name not found:
>
> #!../../bin/linux-x86_64/sd
> < envPaths
> epicsEnvSet("IOC","iocsd")
> epicsEnvSet("TOP","/home/iocusr/sd")
> epicsEnvSet("MODULES","/opt/epics/base/../modules")
> epicsEnvSet("AUTOSAVE","/opt/epics/base/../modules/autosave-R5-7-1")
> epicsEnvSet("ASYN","/opt/epics/base/../modules/asyn-R4-41")
> epicsEnvSet("BUSY","/opt/epics/base/../modules/busy-1-6-1")
> epicsEnvSet("CALC","/opt/epics/base/../modules/calc-R3-7-4")
> epicsEnvSet("CAPUTLOG","/opt/epics/base/../modules/caPutLog-3-5")
> epicsEnvSet("IOCSTATS","/opt/epics/base/../modules/iocStats-3-1-16")
> epicsEnvSet("MODBUS","/opt/epics/base/../modules/modbus-R3-2")
> epicsEnvSet("NETDEV","/opt/epics/base/../modules/netDev-1-0-6")
> epicsEnvSet("PC-MONITOR","/opt/epics/base/../modules/PC-MONITOR1-0-2")
> epicsEnvSet("PROCSERVCONTROL","/opt/epics/base/../modules/procServControl-1-9")
> epicsEnvSet("S7NODAVE","/opt/epics/base/../modules/s7nodave-2-1-3")
> epicsEnvSet("S7PLC","/opt/epics/base/../modules/s7plc")
> epicsEnvSet("SSCAN","/opt/epics/base/../modules/sscan-2-10")
> epicsEnvSet("STREAM","/opt/epics/base/../modules/StreamDevice-2-8-9")
> epicsEnvSet("SNCSEQ","/opt/epics/base/../modules/seq-2-2-6")
> epicsEnvSet("EPICS_BASE","/opt/epics/base")
> epicsEnvSet("EPICS_CA_SERVER_PORT", 5068)
> epicsEnvSet("IOCNAME","sd")
> cd "/home/iocusr/sd"
> dbLoadDatabase "dbd/sd.dbd"
> sd_registerRecordDeviceDriver pdbbase
> dbLoadRecords "db/sd.db", "user=sd"
> drvAsynIPPortConfigure("CAT1","169.254.2.30:5025",0,0,1)
> epicsEnvSet("STREAM_PROTOCOL_PATH", ".:../../db")
> cd "/home/iocusr/sd/iocBoot/iocsd"
> iocInit
> Starting iocInit
> sevr=info s7plcInit: no stations configured
> iocRun: All initialization complete
> epics> dbl
> sd:xh
> caget sd:xh
> Channel connect timed out: 'sd:xh' not found.
>
> epics> asynReport 1
> CAT1 multiDevice:No canBlock:Yes autoConnect:Yes
> enabled:Yes connected:Yes numberConnects 1
> nDevices 0 nQueued 0 blocked:No
> asynManagerLock:No synchronousLock:No
> exceptionActive:No exceptionUsers 1 exceptionNotifys 0
> traceMask:0x1 traceIOMask:0x0 traceInfoMask:0x1
> Port 169.254.2.30:5025: Connected
>
>
>
>
> The db files is as follows:
> record(ai, "$(user):xh") {
> field(DTYP, "stream")
> field(SCAN, "1 second")
> field(INP, "@sd.proto DEVICENAME CAT1")
> }
>
>
> The proto files is as follows:
>
>
> DEVICENAME{
> out "*IDN?";
> in "%f";
> }
>
> The output of the epicsPrtEnvParams command at the IOC prompt is as follows:
>
> epicsPrtEnvParams
> EPICS_CA_ADDR_LIST: 169.254.2.30:5068
> EPICS_CA_CONN_TMO: 30.0
> EPICS_CA_AUTO_ADDR_LIST: NO
> EPICS_CA_REPEATER_PORT: 5065
> EPICS_CA_SERVER_PORT: 5068
> EPICS_CA_MAX_ARRAY_BYTES: 16384
> EPICS_CA_AUTO_ARRAY_BYTES: YES
> EPICS_CA_MAX_SEARCH_PERIOD: 300.0
> EPICS_CA_NAME_SERVERS is undefined
> EPICS_CA_MCAST_TTL: 1
> EPICS_CAS_INTF_ADDR_LIST is undefined
> EPICS_CAS_IGNORE_ADDR_LIST is undefined
> EPICS_CAS_AUTO_BEACON_ADDR_LIST is undefined
> EPICS_CAS_BEACON_ADDR_LIST is undefined
> EPICS_CAS_SERVER_PORT is undefined
> EPICS_CA_BEACON_PERIOD: 15.0
> EPICS_CAS_BEACON_PERIOD is undefined
> EPICS_CAS_BEACON_PORT is undefined
> EPICS_BUILD_COMPILER_CLASS: gcc
> EPICS_BUILD_OS_CLASS: Linux
> EPICS_BUILD_TARGET_ARCH: linux-x86_64
> EPICS_TZ: CST6CDT,M3.2.0/2,M11.1.0/2
> EPICS_TS_NTP_INET is undefined
> EPICS_IOC_IGNORE_SERVERS is undefined
> EPICS_IOC_LOG_PORT: 7004
> EPICS_IOC_LOG_INET is undefined
> EPICS_IOC_LOG_FILE_LIMIT: 1000000
> EPICS_IOC_LOG_FILE_NAME is undefined
> EPICS_IOC_LOG_FILE_COMMAND is undefined
> IOCSH_PS1: epics>
> IOCSH_HISTSIZE: 50
> IOCSH_HISTEDIT_DISABLE is undefined
> epics>
>
>
> The output of theprintenv | grep EPICS command at the shell prompt where running caput is as follows:
>
> printenv | grep EPICS
> EPICS_CA_ADDR_LIST=169.254.2.30:5068
> EPICS_HOST_ARCH=linux-x86_64
> EPICS_CA_AUTO_ADDR_LIST=NO
> EPICS_BASE=/opt/epics/base
> The description of the command of *IDN? is in the attachment.
> I don't know what's wrong, how can I solve this problem?
> Thanks,
> Xiaomin
>
>
>
>
>
>
>
>
>
>
>
- References:
- StreamDevice 刘晓敏 via Tech-talk
- Re: StreamDevice Mark Rivers via Tech-talk
- 回复: StreamDevice liuxiaomin via Tech-talk
- Navigate by Date:
- Prev:
RE: Tech-talk Digest, Vol 16, Issue 101 Rebecca Harding - STFC UKRI via Tech-talk
- Next:
Re: Frequent disconnect and auto-reconnects with Serial ASYN and Stream controlled device Ashish Sharma 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:
回复: StreamDevice liuxiaomin via Tech-talk
- Next:
Epics 7 Alias options question Manoussakis, Adamandios 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
|