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  <20172018  2019  2020  2021  2022  2023  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  <20172018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: stream quesiton
From: l123173 <[email protected]>
To: [email protected]
Date: Thu, 11 May 2017 21:26:35 +0800 (CST)
Hi all,
     I met some question when I use stream to control device. Not familar the stream, so I transfered the command to Hex.
     I tried the Hex command in serial debugging assistant in windows, and it worked.
     When I put the command in stream, the device did not response.
     I used the same command both in windows and epics. Why it failed in stream?
    
I use epics 3.1.12.5 , synapps_5_8, stream-2-6-a.

   when I put value to the pv, the ioc show I sent : \00500FFBW0X000201161\r  (I tried the \r\n, \r and nothing as the terminator)

    Could anyone give me some advice?

Thank you!
    
proto file:
-------------------------
Terminator = CR;
test{
     out "\x05\x30\x30\x46\x46\x42\x57\x30\x58\x30\x30\x30\x32\x30\x31\x31\x36\x31";
}


db file:
----------------------------------
record(ai, "$(P)$(R)test")
{
    field(DESC, "test")
    field(DTYP, "stream")
    field(INP,  "@devplc2.proto test $(PORT) $(A)")
}                                                                                                                      
         

the output of st.cmd:
---------------------
[root@localhost iocplc2]# ./st.cmd
#!../../bin/linux-x86_64/plc2
## You may have to change plc2 to something else
## everywhere it appears in this file
< envPaths
epicsEnvSet("ARCH","linux-x86_64")
epicsEnvSet("IOC","iocplc2")
epicsEnvSet("TOP","/home/lyx/plc2")
epicsEnvSet("ASYN","/opt/epics/synApps_5_8/support/asyn-4-26")
epicsEnvSet("STREAM","/opt/epics/synApps_5_8/support/stream-2-6a")
epicsEnvSet("EPICS_BASE","/opt/epics/base")
epicsEnvSet "STREAM_PROTOCOL_PATH" "/home/lyx/plc2/db"
epicsEnvSet "P" "P"
epicsEnvSet "R" "T"
#epicsEnvSet "TTY" "$(TTY=/dev/ttyS0)"
cd "/home/lyx/plc2"
## Register all support components
dbLoadDatabase "dbd/plc2.dbd"
plc2_registerRecordDeviceDriver pdbbase
#drvAsynSerialPortConfigure("L0","$(TTY)",0,0,0)
drvAsynSerialPortConfigure("L0","/dev/ttyS0",0,0,0)
asynSetOption("L0", -1, "baud", "9600")
asynSetOption("L0", -1, "bits", "8")
asynSetOption("L0", -1, "parity", "none")
asynSetOption("L0", -1, "stop", "1")
asynSetOption("L0", -1, "clocal", "Y")
asynSetOption("L0", -1, "crtscts", "Y")
asynOctetSetInputEos("L0", -1, "\n")
asynOctetSetOutputEos("L0", -1, "\n")
asynSetTraceIOMask("L0",-1,0x2)
asynSetTraceMask("L0",-1,0x9)
dbLoadRecords("db/devplc2.db","P=P,R=T,PORT=L0,A=0")
cd "/home/lyx/plc2/iocBoot/iocplc2"
iocInit
Starting iocInit
############################################################################
## EPICS R3.14.12.5 $Date: Tue 2015-03-24 09:57:35 -0500$
## EPICS Base built May  3 2017
############################################################################
iocRun: All initialization complete
## Start any sequence programs
#seq sncxxx,"user=lyx"
epics>


 


Replies:
RE: stream quesiton Mark Rivers

Navigate by Date:
Prev: using LINR EPICS record palak shimpee
Next: RE: stream quesiton Mark Rivers
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <20172018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: using LINR EPICS record palak shimpee
Next: RE: stream quesiton Mark Rivers
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <20172018  2019  2020  2021  2022  2023  2024