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 | 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 |
<== Date ==> | <== Thread ==> |
---|
Subject: | StreamDevice, asynDriver or some other solution? |
From: | "Bryan J. Boardman / Aware Electronics Corp." <[email protected]> |
To: | <[email protected]> |
Date: | Tue, 22 Jul 2014 15:17:38 -0400 |
Hello good people,
Our company manufactures a line of radiation
detectors that can be controlled and report data by-way-of RS232 connections
using ASCII characters and/or binary. The monitors include both a standard
built-in RS-232 serial port and a built-in USB port using FTDI chip. (FTDI
devices now supported in Ubuntu 11.10, kernel 3.0.0-19 http://www.ftdichip.com/Drivers/VCP.htm
)
Our monitors default to 9600 baud, 8 data, 1 stop
and can be used with RS-232 to Ethernet Serial Device Servers such as: http://www.moxa.com/product/Serial_Device_Servers.htm
RS232 to WiFi, GSM modems, etc.
An overseas customer of ours is converting their
nuclear facility to EPICS and they would like to use it to, among other things,
gather data from and control our monitors.
They state: “As regard EPICS, we are now first
stage which install the base configuration of EPICS (3.14.12 VERSION) at Ubuntu
14.04. We are testing (editing and compiling) and learning the saving the
data (histogram), alarming and reporting procedure.”
An example command for our monitor: If one
sends it the four characters: BELL,P,CR,LF the monitor responds with an
ASCII string floating point number terminated with CRLF, indicating the current
reading.
The other commands are similar.
I previously mentioned to the customer that perhaps
the StreamDevice is the best approach and that a protocol file
(aware.proto) is needed along these lines:
Terminator = CR LF;
# Get the current reading. Send BELL character (\a) and P character to get reading which is a float. get_aware_reading {
out "\aP"; in "%f"; } A db file (aware.db) perhaps like this:
record (stringout, "$(P):get_aware_reading") { field (DTYP, "stream") field (OUT, "@aware.proto info $(BUS)") } A CMD file perhaps like this:
dbLoadDatabase "O.Common/streamApp.dbd" streamApp_registerRecordDeviceDriver #where can protocols be located?
epicsEnvSet "STREAM_PROTOCOL_PATH", ".:protocols:../protocols/" #setup the busses
#drvAsynIPPortConfigure "L0",
"localhost:40000"
vxi11Configure "L0","gpib-dz-1",0,0.0,"gpib0",0,0 #load the records
dbLoadRecords "aware.db","P=DZ,BUS=L0 28" var streamDebug 1
iocInit #enable debug output
var streamDebug 1 I gleaned the above from an example but am not sure
what much of it means, for example dbLoadRecords "aware.db","P=DZ,BUS=L0
28"
I also did not see in the example how to set the
baud rate, etc.
StreamDevice might be overkill so my question is,
if the customer wants to periodically poll the monitor for current reading and
do something with it, for example plot, sound an alarm, etc. which would be the
best solution StreamDevice, asynDriver or some other solution?
I would like to provide the customer with as much
information as possible regarding using our monitors with EPICS
particularly since they are on the EPICS learning curve, so any and all
information and specific examples to accomplish the above would be most
appreciated.
Best
Regards / Bryan Boardman / Manager / Aware Electronics Corp |