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  <20222023  2024  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  <20222023  2024 
<== Date ==> <== Thread ==>

Subject: RE: Tech-talk Digest, Vol 16, Issue 101
From: Rebecca Harding - STFC UKRI via Tech-talk <tech-talk at aps.anl.gov>
To: "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>
Date: Tue, 8 Mar 2022 11:56:18 +0000
Hi Xiaomin,

If you are expecting a string to be returned, you probably need to use a record type of "stringin" instead of "ai".

Kind regards,

Becky

-----Original Message-----
From: Tech-talk <tech-talk-bounces at aps.anl.gov> On Behalf Of tech-talk-request at aps.anl.gov
Sent: 08 March 2022 08:30
To: tech-talk at aps.anl.gov
Subject: Tech-talk Digest, Vol 16, Issue 101

Send Tech-talk mailing list submissions to
	tech-talk at aps.anl.gov

To subscribe or unsubscribe via the World Wide Web, visit
	https://mailman.aps.anl.gov/mailman/listinfo/tech-talk
or, via email, send a message with subject or body 'help' to
	tech-talk-request at aps.anl.gov

You can reach the person managing the list at
	tech-talk-owner at aps.anl.gov

When replying, please edit your Subject line so it is more specific than "Re: Contents of Tech-talk digest..."


Today's Topics:

   1. ??: StreamDevice (liuxiaomin)


----------------------------------------------------------------------

Message: 1
Date: Tue, 8 Mar 2022 16:29:52 +0800
From: liuxiaomin <liuxiaomin at sari.ac.cn>
To: Mark Rivers <rivers at cars.uchicago.edu>,  "tech-talk at aps.anl.gov"
	<tech-talk at aps.anl.gov>
Subject: ??: StreamDevice
Message-ID: <622713FF.03484B.33183 at cstnet.cn>
Content-Type: text/plain; charset="utf-8"

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 










-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.aps.anl.gov/pipermail/tech-talk/attachments/20220308/d7edd218/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 1570D2147DD547BBAA2D5280ED139975.png
Type: image/png
Size: 144744 bytes
Desc: not available
URL: <http://mailman.aps.anl.gov/pipermail/tech-talk/attachments/20220308/d7edd218/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: FB991FFEE86747F09CA232622616DA9C.png
Type: image/png
Size: 143 bytes
Desc: not available
URL: <http://mailman.aps.anl.gov/pipermail/tech-talk/attachments/20220308/d7edd218/attachment-0001.png>

------------------------------

Subject: Digest Footer

_______________________________________________
Tech-talk mailing list Tech-talk at aps.anl.gov
https://mailman.aps.anl.gov/mailman/listinfo/tech-talk


------------------------------

End of Tech-talk Digest, Vol 16, Issue 101
******************************************

This email and any attachments are intended solely for the use of the named recipients. If you are not the intended recipient you must not use, disclose, copy or distribute this email or any of its attachments and should notify the sender immediately and delete this email from your system. UK Research and Innovation (UKRI) has taken every reasonable precaution to minimise risk of this email or any attachments containing viruses or malware but the recipient should carry out its own virus and malware checks before opening the attachments. UKRI does not accept any liability for any losses or damages which the recipient may sustain due to presence of any viruses.


Navigate by Date:
Prev: 回复: StreamDevice liuxiaomin via Tech-talk
Next: Re: 回复: StreamDevice Zimoch Dirk (PSI) 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  <20222023  2024 
Navigate by Thread:
Prev: Re: Timestamp test questions on Linux Michael Davidsaver via Tech-talk
Next: Andor3 issue connecting camera Sandeep Kumar Malu - STFC UKRI 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  <20222023  2024