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: | modbus-tcp |
From: | liuxiaomin via Tech-talk <tech-talk at aps.anl.gov> |
To: | "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov> |
Date: | Tue, 11 Oct 2022 10:46:50 +0800 |
Hi, I am trying to control a device which can get the temperature values ,I used modbus_tk under python to get the value. In order to match with EPICS, I used the support module PyDevice which is an EPICS device support for Python interpreter, When I run the st.cmd file,the complete output when the IOC boots as follows: ./st.cmd #!../../bin/linux-x86_64/waveioc < envPaths epicsEnvSet("IOC","waveioc") epicsEnvSet("TOP","/home/iocusr/iocs/WAVEIOC") 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("PYDEVICE","/opt/PyDevice") epicsEnvSet("EPICS_BASE","/opt/epics/base") epicsEnvSet("EPICS_CA_SERVER_PORT", 5064)) epicsEnvSet("IOCNAME","waveioc") cd "/home/iocusr/iocs/WAVEIOC" ## Register all support components dbLoadDatabase "dbd/waveioc.dbd" waveioc_registerRecordDeviceDriver pdbbase Executing Python code: import pydev Executing Python code: import builtins Executing Python code: builtins.pydev=pydev Executing Python code: import pydev pydev("import sys; sys.path.insert(0,'/home/iocusr/iocs/WAVEIOC/iocBoot/waveioc')") Executing Python code: import sys; sys.path.insert(0,'/home/iocusr/iocs/WAVEIOC/iocBoot/waveioc') pydev("import modbus_tk") Executing Python code: import modbus_tk pydev("from wave import Temp") Executing Python code: from wave import Temp pydev("temp1 = Temp('192.168.0.11','502')") Executing Python code: temp1 = Temp('192.168.0.11','502') dbLoadRecords "db/dbWaveform.db", "user=waveioc" # Configure IP port # drvAsynIPPortConfigure("CAT1","10.40.15.9:502",0,0,1) # Configure modbus # modbusInterposeConfig("CAT1",ModbusLinkType,timeoutMsec,writeDelayMsec) # drvModbusAsynConfigure("WORDIR","CAT1",slaveAddress,modbusFunction,modbusStartAddr,modbusLen,dataType,posMsec,"plcType") cd "/home/iocusr/iocs/WAVEIOC/iocBoot/waveioc" iocInit Starting iocInit ############################################################################ ## EPICS R7.0.5 ## Rev. 2021-08-27T15:52+0800 ############################################################################ sevr=info s7plcInit: no stations configured drvStreamInit: Warning! STREAM_PROTOCOL_PATH not set. Defaults to "." iocRun: All initialization complete # List all PVs to PV information files. #dbl >> ${PVINFOFILE} epics> [31.1 0. 0. ... 21.2 0. 0. ] [31.1 0. 0. ... 21.2 0. 0. ] [31.1 0. 0. ... 21.2 0. 0. ] db[31.1 0. 0. ... 21.2 0. 0. ] l waveioc:TEMP waveioc:RISE waveioc:PEAK waveioc:GETDATA epics> [31. 0. 0. ... 21.4 0.1 0. ] [31. 0. 0. ... 21.4 0.1 0. ] [31. 0. 0. ... 21.4 0.1 0. ] [31. 0. 0. ... 21.4 0.1 0. ] [31. 0. 0. ... 21.4 0.1 0. ] Is there any way to prevent the epics terminal from automatically displaying the values obtained? |