You should enable core dumps and then run gdb on the core file to see where it crashed.
________________________________
From: [email protected] on behalf of Silver
Sent: Sat 10/4/2008 6:31 AM
To: tech-talk
Subject: problem of using Streamdevice
hi, all:
I am just trying Streamdevice driver by Franksen's suggestion. Seems it's a flexabile way of controlling our equipment. But I met some problems, the ioc will crash quickly after starting.
our streamdevice will response 8 bytes data in hex like "55 40 04 67 39 47 be e3". in the data, "67 39 47 be" is a float's 4 bytes. other bytes are header or crc. So I write my protocol file like this:
# example stream protocol file
#Terminator = CR LF;
ReplyTimeout = 80000; # 10 sec is very long, for keyboard input
ReadTimeout = 1000; # also long for keyboard input
# note the field access
ai {
out 170 129 00 129;
in "%*3c%#R%*1c";
}
my example.db is like this:
# process this record to reload all stream protocols
record (ai, "$(PREFIX):ai")
{
field (DESC, "An analog value")
field (DTYP, "stream")
field (INP, "@example.proto ai terminal")
# field (PREC, "3")
# field (LINR, "LINEAR")
# field (ESLO, "0.000305180437934") # 20.0 / 0xffff
# field (EOFF, "-10")
# field (EGU, "V")
field (SCAN, ".5 second")
}
my example.cmd file:
#!./streamApp
dbLoadDatabase "O.Common/streamApp.dbd"
streamApp_registerRecordDeviceDriver
#where can protocols be located?
epicsEnvSet "STREAM_PROTOCOL_PATH", ".:protocols:../protocols/"
#setup the busses
#example telnet style IP port setup
drvAsynIPPortConfigure "terminal", "192.168.1.103:4001"
#asynOctetSetInputEos "terminal",0,"\r\n"
#asynOctetSetOutputEos "terminal",0,"\r\n"
#example VXI11 (GPIB via IP) port setup
#vxi11Configure "GPIB","ins023",1,5.0,"hpib"
#load the records
dbLoadRecords "example.db","PREFIX=DZ"
#dbLoadRecords "scalcout.db","PREFIX=DZ"
#lots! of debug output
#var streamDebug 1
#enable debug output
var streamDebug 1
iocInit
my output of running ioc:
~/testApp/StreamDevice-2-4/streamApp>./example.cmd
#!./streamApp
dbLoadDatabase "O.Common/streamApp.dbd"
streamApp_registerRecordDeviceDriver
#where can protocols be located?
epicsEnvSet "STREAM_PROTOCOL_PATH", ".:protocols:../protocols/"
#setup the busses
#example telnet style IP port setup
drvAsynIPPortConfigure "terminal", "192.168.1.103:4001"
#asynOctetSetInputEos "terminal",0,"\r\n"
#asynOctetSetOutputEos "terminal",0,"\r\n"
#example VXI11 (GPIB via IP) port setup
#vxi11Configure "GPIB","ins023",1,5.0,"hpib"
#load the records
dbLoadRecords "example.db","PREFIX=DZ"
#dbLoadRecords "scalcout.db","PREFIX=DZ"
#lots! of debug output
#var streamDebug 1
iocInit
Starting iocInit
############################################################################
### EPICS IOC CORE built on Sep 27 2008
### EPICS R3.14.8.2 $R3-14-8-2$ $2006/01/06 15:55:13$
############################################################################
iocInit: All initialization complete
#enable debug output
var streamDebug 1
epics>
epics> dbpr DZ:ai
ASG: DESC: An analog value DISA: 0
DISP: 0 DISV: 1 NAME: DZ:ai RVAL: 0
SEVR: NO_ALARM STAT: NO_ALARM SVAL: 0 TPRO: 0
VAL: 0.003662109375
epics> Segmentation fault
:~/testApp/StreamDevice-2-4/streamApp>
Can anybody give me some hints? thanks a lot for your help.
Best regards
Geyang 2008-10-04
- Replies:
- Re: RE: problem of using Streamdevice Silver
- References:
- problem of using Streamdevice Silver
- Navigate by Date:
- Prev:
problem of using Streamdevice Silver
- Next:
Re: RE: problem of using Streamdevice Silver
- 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
- Navigate by Thread:
- Prev:
problem of using Streamdevice Silver
- Next:
Re: RE: problem of using Streamdevice Silver
- 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
|