Argonne National Laboratory

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

Subject: RE: stream quesiton
From: Mark Rivers <rivers@cars.uchicago.edu>
To: l123173 <l123173@163.com>, "tech-talk@aps.anl.gov" <tech-talk@aps.anl.gov>
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: tech-talk-bounces@aps.anl.gov [tech-talk-bounces@aps.anl.gov] on behalf of l123173 [l123173@163.com]
Sent: Thursday, May 11, 2017 8:26 AM
To: tech-talk@aps.anl.gov
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  <2017
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  <2017
ANJ, 12 May 2017 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·