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: RE: stream quesiton
From: Mark Rivers <[email protected]>
To: l123173 <[email protected]>, "[email protected]" <[email protected]>
Date: Thu, 11 May 2017 13:47:20 +0000
You should also send us the output when you used the serial debugging assistant in Windows.

Is your device supposed to send a response to this command?

Mark

________________________________
From: [email protected] [[email protected]] on behalf of l123173 [[email protected]]
Sent: Thursday, May 11, 2017 8:26 AM
To: [email protected]
Subject: stream quesiton

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>





References:
stream quesiton l123173

Navigate by Date:
Prev: stream quesiton l123173
Next: Re: EPICS CPP 4.6.0 Build Error Andrew Johnson
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: stream quesiton l123173
Next: OPC UA EPICS device support license Thomas, Patrick
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