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  <20122013  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  <20122013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: ISEG EHS device support on the Raspberry Pi Computer
From: Florian Feldbauer <[email protected]>
To: Mark Rivers <[email protected]>, EPICS tech talk <[email protected]>
Date: Tue, 11 Sep 2012 15:45:52 +0200
Hi,

thanks for your replies. Writing an asyn driver seems a pretty good idea.

But for the EHS modules from ISEG, I don't think StreamDevice would be feasible.
Maybe I'm biased due to our old CAN interfaces.
Up to now we used asynDriver and StreamDevice to control these modules. But our CAN interfaces were in principal RS232- or USB-to-CAN converters which read/write ASCII-Strings. Every single byte from the can frame was coded as 2 digit hex value
separated by blanks (somethink like "ab 24 1f 05").
The EHS modules use 32bit float values for currents, voltages and temperatures. So we needed to convert a IEEE754 32bit float to something which stream could write like "%02x %02x %02x %02x", or the other way around.

Therefore I think a device support for this modules would be more feasible.
Sure, if we write our own asyn driver one could think about an interface which reads/writes bitstreams, so we don't need such a conversion.

Best regards,
Florian


On 09/10/2012 04:53 PM, Mark Rivers wrote:
Hi Florian,

I would encourage you to consider whether you should write device support at all.  I am copying Bruno on this as well, because I meant to respond to his earlier thread "aiRecord conversion" with a similar comment.

Instead of writing device support you should really consider writing an asyn driver.  If you do that then device support is done for you, and you don't need to worry about all the details of how records interact with device support.  Writing an asyn driver is actually quite easy.  There are many advantages:

- Support for synchronous and asynchronous devices requires a single-bit change in your driver's registration.
- Support for I/O Intr scanned records is easy.
- The device support is already debugged.
- You get the asynTrace capabilities for standard debugging support.
- You free the developer to use whatever records they want, rather than only the records you support in your device support.
- If you use asynPortDriver as your base class most of the details asyn are hidden from you.  You don't need to worry about registering the port, registering the interfaces, how to do callbacks, etc.

In your case you might also be able to use StreamDevice.  I don't know enough about the CAN interface to know if this is feasible or not.

There are lots of examples of asyn drivers, including testAsynPortDriverApp in the asyn package, the Modbus driver, and many other drivers in the synApps package.

Mark


-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Florian Feldbauer
Sent: Monday, September 10, 2012 6:24 AM
To: EPICS tech talk
Subject: ISEG EHS device support on the Raspberry Pi Computer

Dear all,

at Bochum university, we have developed a CAN bus interfacefor the
Raspberry Pi computer [1]
using the SJA1000 stand-alone CAN controller.

We are using this interface to control the high voltage power supply modules
EHS 8 620p-F and EHS 8 210p-F from ISEG [2] via the crate controller ECH238.

I have programmed a device support for these high voltage modules based
on our Raspberry Pi Can interface.
You can find the sources for the device support as well as the schematic
of our CAN interface on github:
https://github.com/ffeldbauer/epics_RPi_can

I will upgrade this repository with a device support for our Wiener VME
crate, and some custom hardware.
The VME crate has an CAN interface which can be used to read out
voltages, currents, temperature and status of the crate.

Up to now the driver support in EPICS is only synchronous. Is there any
documentation on how to program an
asynchronous driver support? For some other devices we would need an
asynchronous support.

Best regards,
Florian

[1] http://www.raspberrypi.org/
[2] http://www.iseg-hv.com/en/products/product-details/product/21/



--
-------------------------------------
| Dr. rer. nat. Florian Feldbauer   |
|                                   |
| Institut für Experimentalphysik I |
| Ruhr-Universität Bochum           |
| Universitätsstr. 150              |
| D-44780 Bochum                    |
|                                   |
| Office: NB 2/173                  |
| Phone:  (+49)234 / 32-23538       |
| Fax:    (+49)234 / 32-14170       |
| Web:    http://www.ep1.rub.de     |
-------------------------------------


Replies:
RE: ISEG EHS device support on the Raspberry Pi Computer peter.owens
References:
ISEG EHS device support on the Raspberry Pi Computer Florian Feldbauer
RE: ISEG EHS device support on the Raspberry Pi Computer Mark Rivers

Navigate by Date:
Prev: RE: windows-x64 tool versions james.rowland
Next: RE: ISEG EHS device support on the Raspberry Pi Computer peter.owens
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: RE: ISEG EHS device support on the Raspberry Pi Computer Mark Rivers
Next: RE: ISEG EHS device support on the Raspberry Pi Computer peter.owens
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 18 Nov 2013 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·