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 2025 | 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 2025 |
<== Date ==> | <== Thread ==> |
---|
Subject: | RE: StreamDevice, asynDriver or some other solution? |
From: | Mark Rivers <[email protected]> |
To: | "'Bryan J. Boardman / Aware Electronics Corp.'" <[email protected]>, "[email protected]" <[email protected]> |
Date: | Tue, 22 Jul 2014 19:45:13 +0000 |
Hi Bryan, I think you are on exactly the right track in recommending StreamDevice for this application. Here is a slightly tweaked version of what you sent: Here is the .proto file. Don’t need the TERMINATOR, let that be set for the port with asynOctetSetInputEos, etc. # Get the current reading. Send BELL character (\a) and P character to get reading which is a float. get_aware_reading { A db file (aware.db) perhaps like this: A CMD file perhaps like this: #where can protocols be located? #setup the Moxa terminal server drvAsynIPPortConfigure "serial1", "164.54.160.22 2101" asynOctetSetOutputEos(”serial1”,0, “\r\n”) asynOctetSetInputEos(“serial1”,0, “\r\n”) drvAsynSerialPortConfigure(“serial2”, “/dev/ttys0”) asynSetOption(“serial2”,0,”baud”,”9600”) asynSetOption(“serial2”,0,”bits”,”8”) asynSetOption(“serial2”,0,”stop”,”1”) asynOctetSetOutputEos(”serial2”,0, “\r\n”) asynOctetSetInputEos(“serial2”,0, “\r\n”) #load the records dbLoadRecords "aware.db","P=DZ2,PORT=serial2" 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" That loads a database definition file (aware.db that you listed previously) into the run-time EPICS database. It passes a parameter P that is the prefix for the record names, and BUS (changed to PORT in my example) telling it the name
of the asyn port driver to communicate with. > I also did not see in the example how to set the baud rate, etc. I have added that in my example for the local serial port (/dev/ttys0). > 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? StreamDevice is not overkill, it is exactly what you want. It talks to an underlying generic asynDriver for the local serial port, or Moxa terminal server, etc. With this solution the user does not need to write any C code. Cheers, Mark From: [email protected] [mailto:[email protected]]
On Behalf Of Bryan J. Boardman / Aware Electronics Corp. 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_aware_reading { A db file (aware.db) perhaps like this: A CMD file perhaps like this: #where can protocols be located? #setup the busses #drvAsynIPPortConfigure "L0", "localhost:40000" #load the records var streamDebug 1 #enable debug output 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 |