EPICS Controls 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  2018  2019  2020  <20212022  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  2017  2018  2019  2020  <20212022  2023  2024 
<== Date ==> <== Thread ==>

Subject: can't readable 'arduino.proto' in 'helloWorldIOCApp/Db'
From: Andrea Solano via Tech-talk <tech-talk at aps.anl.gov>
To: "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>
Date: Mon, 11 Jan 2021 11:42:58 +0000
Hi, I have a problem with reading the 
protocol file. All code from: http://www.smolloy.com/2015/12/epics-serial-communication-with-arduino/
I use EPICS LAST VERSION 
WITH ASYN AND STREAM DEVICE 
LAST VERSION
Detail of mi ioc initialization: 
#!../../bin/linux-arm/helloWorldIOC
< envPaths
Can't open envPaths: No such file or directory
epicsEnvSet(STREAM_PROTOCOL_PATH,"helloWorldIOCApp/Db")
macLib: macro TOP is undefined (expanding string cd "${TOP}")
## Register all support components
dbLoadDatabase "dbd/helloWorldIOC.dbd"
helloWorldIOC_registerRecordDeviceDriver pdbbase
drvAsynSerialPortConfigure("SERIALPORT","/dev/ttyACM0",0,0,0)
asynSetOption("SERIALPORT",-1,"baud","115200")
asynSetOption("SERIALPORT",-1,"bits","8")
asynSetOption("SERIALPORT",-1,"parity","none")
asynSetOption("SERIALPORT",-1,"stop","1")
asynSetOption("SERIALPORT",-1,"clocal","Y")
asynSetOption("SERIALPORT",-1,"crtscts","N")
dbLoadRecords("db/arduino.db","PORT='SERIALPORT'")
## Load record instances
#dbLoadRecords("db/xxx.db","user=pi")
cd "/home/pi/EPICS/helloWorldIOC/iocBoot/iochelloWorldIOC"
iocInit
Starting iocInit
############################################################################
## EPICS R7.0.4.2-DEV
## Rev. R7.0.4.1-117-g4f14e9e674cfc16be1b2
############################################################################
2021/01/11 12:16:34.315589 _main_ Can't find readable file 'arduino.proto' in 'helloWorldIOCApp/Db'
2021/01/11 12:16:34.315919 _main_ while reading protocol 'set_digital' for 'led:set'
2021/01/11 12:16:34.316084 _main_ led:set: Protocol parse error
2021/01/11 12:16:34.316252 _main_ led:set: Record initialization failed
Error (514,11) PV: led:set ao: init_record

2021/01/11 12:16:34.316618 _main_ Can't find readable file 'arduino.proto' in 'helloWorldIOCApp/Db'
2021/01/11 12:16:34.316787 _main_ while reading protocol 'get_analog' for 'photo:get'
2021/01/11 12:16:34.316946 _main_ photo:get: Protocol parse error
2021/01/11 12:16:34.317103 _main_ photo:get: Record initialization failed
iocRun: All initialization complete
## Start any sequence programs
#seq sncxxx,"user=pi"

My protocol file:

Terminator = LF;
get_analog {
    out "R";
    in "R %f";
    ExtraInput = Ignore;
}
set_digital {
    out "W%d\n";
    ExtraInput = Ignore;
}

My db file:

record(ao, led:set) {
    field(DESC, "Arduino digi pin 11")
    field(DTYP, "stream")
    field(OUT, "@arduino.proto set_digital() $(PORT)")
    field(DRVL, "0")
    field(DRVH, "255")
}
record(ai, photo:get) {
    field(DESC, "Photo diode's output")
    field(DTYP, "stream")
    field(INP, "@arduino.proto get_analog() $(PORT)")
    field(SCAN, ".5 second")
}






Replies:
Re: can't readable 'arduino.proto' in 'helloWorldIOCApp/Db' Mark Rivers via Tech-talk

Navigate by Date:
Prev: Re: USB V4L2 driver camera Palaha, Arvinder (DLSLtd, RAL, LSCI) via Tech-talk
Next: Re: can't readable 'arduino.proto' in 'helloWorldIOCApp/Db' Mark Rivers via Tech-talk
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  <20212022  2023  2024 
Navigate by Thread:
Prev: Re: Can't enable custom frame rates for a basler camera in area detector Mark Rivers via Tech-talk
Next: Re: can't readable 'arduino.proto' in 'helloWorldIOCApp/Db' Mark Rivers via Tech-talk
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  <20212022  2023  2024 
ANJ, 17 Jan 2021 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·