[Halld-controls] [Halld-online] Agenda for Hall D Online meeting next week, 13-Oct
Hovanes Egiyan
hovanes.egiyan at gmail.com
Mon Nov 15 10:07:10 EST 2010
Hello Matt,
You will need to install EPICS on a Linux system (preferably latest
tested version R3.14.11),
And I probably do have a small working system but they usually work
with some specific
hardware, but I will need to look to see which one would be better.
The HV system I sent you works, but Hall B is currently using an older
version of EPICS base
R3.14.8.2.
You can download the EPICS base from the main EPICS web page :
http://www.aps.anl.gov/epics/download/base/index.php
I would recommend to install it on 32 bit system, 64 bit sometimes may
cause extra
problems, although in general it works.
There is a Hall B wiki page here at JLab with some instructions on how
to install EPICS base
R3.14.8.2 (it's the old version). Here is the link, which you should be
able to open but
it will ask for some login information:
https://clonwiki.jlab.org/wiki/index.php/EPICS_Base_Installation
I attached a PDF file which I created off that page so that you can read
that in any case. Note that
the author was building EPICS Base on a Solaris operating system and was
using a cross-compiler. So
it is possible that not everything will run exactly the same way. You
probably would have to
use variables and files with "_linux-x86" (whenever he sets them by
hand) instead of
"_solaris-sparc". Some of the steps might not even be necessary for the
new version
of the base and for Linux. And you will probably find out that EPICS
has a complicated make-scheme,
which sometimes can be major pain.
I prefer installing epics in /usr/local/epics/ , at least on my computers:
quark:hovanes> dir /usr/local/epics/
total 1.5M
lrwxrwxrwx 1 root sys 12 2010-09-29 16:47 base -> base-3-14-11
drwxr-xr-x 17 hovanes users 4.0K 2010-11-04 16:52 base-3-14-11
-rw-r--r-- 1 root sys 1.5M 2010-09-29 16:37 baseR3.14.11.tar.gz
drwxr-xr-x 7 hovanes users 4.0K 2010-10-04 10:35 extensions
-rw-r--r-- 1 hovanes users 11K 2010-09-29 17:21 extensionsTop_20070703.tar.gz
You will need to source a script to setup your variables from your login
screen.
quark:hovanes> source $EPICS_BASE/startup/Site.cshrc
I think you need to edit that file and set EPICS_BASE variable (to
/usr/local/epics/base if
in my case)
To create your application you can use the scripts provided in the base
and called
$EPICS_BASE/bin/linux-x86_64/makeBaseApp.pl
You need to create a "support", where you build your software libraries
and the IOC executable for the HV control. And then you need to create a
directory
that contains some scripts and env-files from which you run the IOC you
built.
quark:EPICS> $EPICS_BASE/bin/linux-x86_64/makeBaseApp.pl -t support fdcHV
quark:EPICS> $EPICS_BASE/bin/linux-x86_64/makeBaseApp.pl -i -t ioc -p
fdcHV FdcHV
You can also get an examples of applications and IOCs, the script has
help option :
quark:EPICS> $EPICS_BASE/bin/linux-x86_64/makeBaseApp.pl -h
We do not have a decision what we will use for GUIs, but at this point
you can download
and use "EDM" or "MEDM" extension since they are pretty easy to use.
http://www.aps.anl.gov/epics/extensions/index.php
Let me know if you need help with this,
Hovanes.
On 11/03/2010 01:03 PM, Matthew Shepherd wrote:
> Hovanes,
>
> Thanks for this -- I looked through the sy1527 files and these look very similar in style to libraries we have already written to do control.
>
> I'm also cc'ing Dan Bennett (grad student at IU) on this since he is starting to write a simple monitoring system for our tests and would be the one to help to develop the interface with the JLab control system.
>
> Is it possible to setup an test EPICS control system and use it to control bases for our tests? This would help us first. learn what EPICS is and how it works, and how integrate our software into the EPICS environment. If you have an example of a small working EPICS system we could pattern our development after this.
>
> Regarding third party software, we do need to utilize the API provided by the manufacturer to interface with the ethernet to CAN converter. Right now the manufacturer distributes precompiled libraries and headers, but perhaps we can get the source.
>
> -Matt
>
>
> On Oct 24, 2010, at 9:28 PM, Hovanes Egiyan wrote:
>
>
>> Hello Matt,
>>
>> as an example I posted on CUE some of the files for the EPICS driver for particular type of HV
>> mainframes and boards. We made that driver for CAEN HV chassis in Hall B a
>> couple of years ago, and they work fine. The HV chassis had an ability to communicate
>> through the Ethernet port. And from what I heard this is similar to what you may do for FCal.
>>
>> At this point the main purpose of this example
>> would be to look at a couple of source files without trying to compile the whole thing because
>> I am not sure how well it will work. Successfully compiling an EPICS application which was written
>> for an older version of EPICS may take too much time and may not be very useful
>> for this.
>>
>> Please take a look in the following directory on JLab CUE machines :
>> /group/halld/Users/hovanes/CaenExample/Driver
>>
>> In particular the source files are the analogues for what would be needed
>> to connect the FCAL HV application to EPICS:
>> sy1527.c
>> sy1527.h
>> sy1527epics1.h
>> sy1527epics1.c
>>
>> The "sy1527.h" and "sy1527.c" are the HV application itself. The application synchronizes
>> the states of the HV chassis with the memory in the Linux host which is running
>> the EPICS Input/Output Controller (IOC). This shadowing was done to avoid problems when
>> users send a large number requests directly to hardware.
>>
>> "sy1527epics1.h" and "sy1527epics1.c" are the interface to EPICS. These comprise the
>> set of functions which EPICS needs to operate the HV mainframes. In principle
>> these kind of calls are ALL that EPICS would need, but what happens behind these functions
>> needs to be well designed.
>>
>> In Hall B case the actual driver for communicating to the chassis through Ethernet port
>> was only available to us in the form of binary files ("O.linux-x86/libsy1527epics1.a"
>> and "O.linux-x86/libsy1527epics1.so"), CAEN refused to give us the source files. The
>> header file for these functions are in "CAENHVWrapper.h" file. I hope this situation is
>> not going to be the case for your system.
>>
>> The set of functions here (sy1527epics1.h) was chosen specifically to the CAEN HV boards and
>> chassis (and what we intended to make available to the users).
>> For FCAL they may be different, and we need to come up with the appropriate set.
>>
>> Although this driver is written in C it did not have to be. We can easily accommodate
>> C++ in EPICS as well, and that would be my preference at this time.
>>
>> This is example of course assumes that we go directly to EPICS with the FCAL HV application.
>>
>> Regards,
>> Hovanes.
>>
>>
>>
>> On 10/06/2010 08:52 AM, Matthew Shepherd wrote:
>>
>>> Hovanes,
>>>
>>> We have tested and used this device with success:
>>>
>>> http://www.anagate.de/en/products/AnaGateCANquattro.htm
>>>
>>> A year or two ago, this seemed to be the best product on the market for us.
>>>
>>> Right now we plan roughly 30 CAN busses each with about 100 bases on them. (The FCAL will have a total of 2800 channels.) I think we'll need to get a full busload of them before we can start to understand any bandwidth limitations and how that might affect setup time or monitoring loops. The base firmware only responds when talked to -- in other words, there is no monitoring loop running on the bases (at this stage). We'll need to periodically poll each bus to check for failures, etc.
>>>
>>> I really don't know anything about EPICS. If there is some example to start to work with, we can begin to design a control system using the control libraries that we have already developed.
>>>
>>> -Matt
>>>
>>>
>>> On Oct 6, 2010, at 8:43 AM, Hovanes Egiyan wrote:
>>>
>>>
>>>
>>>> Hi Matt, Elliott and Fernando,
>>>>
>>>> If there is already a configuration allowing Ethernet control of the
>>>> HVs then using PLC beyond that is not an efficient thing to do.
>>>> EPICS would probably be our best choice, and depending on the hardware
>>>> there might already be an EPICS driver available.
>>>> Otherwise we need to write an EPICS application based on some basic driver
>>>> using Ethernet, which I understood is what Matt already has. Here I am talking about a
>>>> set of functions sending simple messages like setting a voltage or a trip current,
>>>> reading voltages and status etc. The application details would depend on the number
>>>> of Ethernet ports and channels that we need to control.
>>>>
>>>> For instance we can have a thread per bus running on a single EPICS
>>>> host in the counting house which is keeping track of the state in which channels are
>>>> in a bus and is keeping an image of the bus in the memory. The thread will synchronize
>>>> the memory in the host and the state of the channels in the hardware every
>>>> second in a synchronized manner. This way there will not be too much traffic
>>>> generated depending what the EPICS users wants to do, the user will be isolated
>>>> from the hardware which will prevent too many request to the hardware. For this
>>>> it would be useful to have functions for dealing with more channels at once for
>>>> certain operations.
>>>>
>>>> If the number of channels is small compared to the capabilities of these "chassis"
>>>> with Ethernet ports then the the application can be much simpler,
>>>> with an EPICS variable directly requesting and sending information to the
>>>> hardware channel. But what exactly we do depends very much on what the hardware
>>>> is (brand and models of the modules) and how the channels are distributed in
>>>> the CAN buses, and how many CANs are connected to a single Ethernet port. Is there
>>>> a web site or a presentation where I could look how this is going to be built?
>>>>
>>>> It may be also useful for us to know what scaler modules and discriminator modules
>>>> you are planning to use for FCAL so that we can start thinking about that part
>>>> of the slow controls as well.
>>>>
>>>> Regards,
>>>> Hovanes.
>>>>
>>>>
>>>>
>>>> On 10/06/2010 04:13 AM, Matthew Shepherd wrote:
>>>>
>>>>
>>>>> Hi Elliott and Fernando,
>>>>>
>>>>> Yes -- to elaborate a little more. I envision we will provide some chassis with about 30 different ethernet sockets (one for each CAN bus). We can provide a library that implements calls like:
>>>>>
>>>>> setHV( busID, baseID, value )
>>>>> readHV( busID, baseID )
>>>>> readCurrent( busID, baseID )
>>>>> ..
>>>>>
>>>>> In order to be able to practically use this, there needs to be some interface between the user and these modular components. A stand-alone program would work, but this is not ideal as you probably desire a common framework for generating alarms, recording status etc. This part of the system is a bit nebulous to me, but seems to be the heart of a well-designed control framework. Practically, what does the interface look like? We want to start building that interface over the next 2-3 months so that we can use it to power, test, and monitor 500 CW bases.
>>>>>
>>>>> -Matt
>>>>>
>>>>>
>>>>> On Oct 5, 2010, at 10:40 PM, Fernando J. Barbosa wrote:
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>> Hi Elliott,
>>>>>>
>>>>>> Maybe I am missing something here but some time ago you decided on using the PLC. I believe Matt already has the ethernet-to-CAN controller (off-the-shelf). The custom box I mentioned in the past was for the CDC and the FDC LV distribution, not for the CW bases.
>>>>>>
>>>>>> This suggests that you need to have a cohesive plan for all the controls in place soon.
>>>>>>
>>>>>> Best regards,
>>>>>> Fernando
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> Elliott Wolin wrote:
>>>>>>
>>>>>>
>>>>>>
>>>>>>> Hi Matt,
>>>>>>>
>>>>>>> There are a number of approaches to control all those CAN channels in the FCAL C-W bases (by the way, did you determine how many CAN buses we'll need, i.e. how many channels per bus is acceptable?).
>>>>>>>
>>>>>>> My favorite would entail direct PLC control of the CAN system, but I don't think the PLC and CAN worlds overlap much, at least I haven't found anything that directly and simply bridges the two. The PLC can talk Ethernet/IP, but I haven't come across an Ethernet/IP CAN control system (but I haven't looked in a while).
>>>>>>>
>>>>>>> We plan to use EPICS to tie all the disparate control systems in the hall together by providing a thin layer on top of autonomous, intelligent devices. I'm also hoping that the "autonomous, intelligent devices" are not PC's strewn about the hall running programs written by undergrads who are long gone. Experience at JLab is that such systems almost always have to be redone, and thus we might as well do it right at the beginning.
>>>>>>>
>>>>>>> So, how to make an robust, intelligent, autonomous multi-bus CAN control system that controls the bases and can talk to EPICS, preferably one that is not just a PC on a table in the hall?
>>>>>>>
>>>>>>> I once looked at the National Instruments cRIO line. Last I looked they had 2-channel CAN modules that mount in a cRIO chassis, eight slots (16 buses) per chassis. The chassis contains a Labview-programmable cpu and FPGA. It was a bit expensive, but one could make a robust, autonomous, stand-alone, EPICS compatible controller this way. AT the time they were offerering me big discounts, probably because cRIO was new and they were looking for applications they could brag about.
>>>>>>>
>>>>>>> I also saw some devices on the web with many CAN controllers in them, but didn't investigate.
>>>>>>>
>>>>>>> Fernando once thought GlueX should build a custom box for this purpose, maybe he still does. I don't know what he had in mind.
>>>>>>>
>>>>>>> What are your thoughts?
>>>>>>>
>>>>>>> Sincerely,
>>>>>>> Elliott
>>>>>>>
>>>>>>>
>>>>>>> ================================================================================
>>>>>>>
>>>>>>>
>>>>>>> Those raised in a morally relative or neutral environment will hold
>>>>>>> no truths to be self-evident.
>>>>>>> Elliott Wolin
>>>>>>> Staff Physicist, Jefferson Lab
>>>>>>> 12000 Jefferson Ave
>>>>>>> Suite 8 MS 12A1
>>>>>>> Newport News, VA 23606
>>>>>>> 757-269-7365
>>>>>>>
>>>>>>> ================================================================================
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Matthew Shepherd wrote:
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>> Hi Elliott,
>>>>>>>>
>>>>>>>> We are expecting to build 500 of the CW PMT bases in the next few months. Once we get them we will want to begin design of the CW slow control system. As of now we are planning to use an ethernet to CAN converter that we have tested and written some libraries for. However, we would prefer to have to have to redesign it later to integrate into the Hall D control system. Any advice or guidance you can provide on the design would be helpful. Is there a particular framework that you would like us to work within?
>>>>>>>>
>>>>>>>> -Matt
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> On Oct 4, 2010, at 3:21 PM, Elliott Wolin wrote:
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>> Hi,
>>>>>>>>>
>>>>>>>>> We haven't met in a while, so status reports and updates on all topics are appropriate. Also, anything notable that has happened in the past two months (designs, construction efforts, test results, conferences, etc).
>>>>>>>>>
>>>>>>>>> Please send me topics.
>>>>>>>>>
>>>>>>>>> Thanks,
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Sincerely,
>>>>>>>>> Elliott
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> ================================================================================
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Those raised in a morally relative or neutral environment will hold
>>>>>>>>> no truths to be self-evident.
>>>>>>>>> Elliott Wolin
>>>>>>>>> Staff Physicist, Jefferson Lab
>>>>>>>>> 12000 Jefferson Ave
>>>>>>>>> Suite 8 MS 12A1
>>>>>>>>> Newport News, VA 23606
>>>>>>>>> 757-269-7365
>>>>>>>>>
>>>>>>>>> ================================================================================
>>>>>>>>>
>>>>>>>>> _______________________________________________
>>>>>>>>> Halld-online mailing list
>>>>>>>>> Halld-online at jlab.org
>>>>>>>>> https://mailman.jlab.org/mailman/listinfo/halld-online
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>> <barbosa.vcf>
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: EPICS Base Installation.pdf
Type: application/pdf
Size: 112503 bytes
Desc: not available
Url : https://mailman.jlab.org/pipermail/halld-controls/attachments/20101115/36716447/attachment-0001.pdf
More information about the Halld-controls
mailing list