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  <20162017  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  <20162017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: RE: Epics-Digitizer Communication
From: Mark Rivers <[email protected]>
To: Hulusi Öz <[email protected]>, Eric Norum <[email protected]>
Cc: tech-talk <[email protected]>
Date: Mon, 1 Aug 2016 11:17:05 +0000
> However, in asynPortDriver I don't understand where should I change/edit in "st.cmd" file

The driver you write will define a new command to create your driver.  You will put that new command in your st.cmd file.

For another example driver you can look at the Measurement Computing driver:

https://github.com/epics-modules/measComp

It uses a vendor library like you will need to do for the Caen digitizer.  The measCompApp/demoSrc directory contains a series of example drivers, increasing in complexity from version 1 through version 5.  The documentation/ directory contains PDF files of talks I have given explaining these drivers.

Mark

________________________________
From: Hulusi Öz [[email protected]]
Sent: Monday, August 01, 2016 1:21 AM
To: Mark Rivers; Eric Norum
Cc: tech-talk
Subject: Re: Epics-Digitizer Communication

Thank you for recommendations sir, I'll try to use asynPortDriver. But, in order to do that, I've to understand how it works.

For example, in Serial way, I edit the "st.cmd" to recognize the port name like  "/dev/ttyACM0" .
However, in asynPortDriver I don't understand where should I change/edit in "st.cmd" file ( I'm using testAsynPortDriver in order to understand how it works).

Thanks in advance,
Regards.

Hulusi Oz

2016-07-29 16:39 GMT+03:00 Mark Rivers <[email protected]<redir.aspx?REF=eKZj4MgWawTPUu6ckh_nulJoEdWpv5JJKRCQ-X9OX1kwxevV-7nTCAFtYWlsdG86cml2ZXJzQGNhcnMudWNoaWNhZ28uZWR1>>:
Hi,

You need to edit asyn/configure/CONFIG_SITE.  It contains these lines:

# If you have libusb-1.0 revision 16 or newer and want the USB TMC support set DRV_USBTMC=YES
#DRV_USBTMC=YES

# You can also define this on a per-architecture basis.
# In this example DRV_USBTMC would be built only for linux-x86_64, and not for other architectures
#ifeq (linux-x86_64, $(T_A))
#  DRV_USBTMC=YES
#endif

So you need to uncomment DRV_USBTMC=YES if you have the required support and want to build it.  Then your application Makefile should include the lines:

# testUSBTMC.dbd will be created and installed
DBD += testUSBTMC.dbd

However, I suspect the CAEN device does not use USBTMC.  Apparently they provide a C-callable library to control the digitizer.  You will need to write an EPICS driver using that library.  I suggest you use the asynPortDriver base class if you decide to do this.

Mark




________________________________
From: [email protected]<redir.aspx?REF=w84iECr0gHZWG1ezAdLxavrVrZHpxT4j7Wa3Qo1cM3swxevV-7nTCAFtYWlsdG86dGVjaC10YWxrLWJvdW5jZXNAYXBzLmFubC5nb3Y.> [[email protected]<redir.aspx?REF=w84iECr0gHZWG1ezAdLxavrVrZHpxT4j7Wa3Qo1cM3swxevV-7nTCAFtYWlsdG86dGVjaC10YWxrLWJvdW5jZXNAYXBzLmFubC5nb3Y.>] on behalf of Hulusi Öz [[email protected]<redir.aspx?REF=NCRLsicWEiHm-2mhS-erbYxVUMtVd-9QbQ8pHme9SAswxevV-7nTCAFtYWlsdG86aHVsdXNpLm96MUBnbWFpbC5jb20.>]
Sent: Friday, July 29, 2016 8:15 AM
To: Ford, Christopher
Cc: Eric Norum; tech-talk
Subject: Re: Epics-Digitizer Communication

Hi again,

I've just talked with CAEN's supports and there isn't a support module to communicate with that digitizer.

Before I did not get that mail from them, I was dealing with the asynUSBTMC and asynPortDriver.
In USBTMC, I could not handle anything with that. I don't know what the problem is. It keep says that :

# Configure hardware
# usbtmcConfigure(port, vendorNum, productNum, serialNumberStr, priority, flags)
usbtmcConfigure("usbtmc1")
st.cmd line 18: Command usbtmcConfigure not found.
asynSetTraceIOMask("usbtmc1",0,0x2)
st.cmd line 19: Command asynSetTraceIOMask not found.
asynSetTraceMask("usbtmc1",0,0x03)
st.cmd line 20: Command asynSetTraceMask not found.

However, in PortDriver, I am just using test application,but I don't understand how it works, does it support USB port ? If it supports, how can i configurate it (in st.cmd file) ?

I'm searching how to communicate with the digitizer by doing these applications. If there are another suggestions, I would be pleasure to know them..

Thanks in advance..
Best Regards..

Hulusi Oz

2016-07-29 9:54 GMT+03:00 Hulusi Öz <[email protected]<redir.aspx?REF=NCRLsicWEiHm-2mhS-erbYxVUMtVd-9QbQ8pHme9SAswxevV-7nTCAFtYWlsdG86aHVsdXNpLm96MUBnbWFpbC5jb20.><redir.aspx?REF=T8q0M3CtV41hD9CQXEbnKc8UjqDRZmscyWUU8Tlsi8fI3COVtLfTCAFtYWlsdG86aHVsdXNpLm96MUBnbWFpbC5jb20.>>:
Unfortunately, I do not have a choice in terms of using optical controller. I am now trying to integrate the usbtmcExample to the my example. But, in somehow it can not recognize the commands like ("usbtmcConfigure(....)"). I included and edited the files in my example in order to recognize USBTMC option of AsynDriver, at this time, when I make the example, it gives an error that says,

/opt/epics/example/exampleApp/src/O.linux-x86_64/example_registerRecordDeviceDriver.cpp:498: undefined reference to `pvar_func_usbtmcRegisterCommands'
collect2: error: ld returned 1 exit status
/opt/epics/base/configure/RULES_BUILD:183: recipe for target 'example' failed
make[3]: *** [example] Error 1
make[3]: Leaving directory '/opt/epics/example/exampleApp/src/O.linux-x86_64'
/opt/epics/base/configure/RULES_ARCHS:63: recipe for target 'install.linux-x86_64' failed
make[2]: *** [install.linux-x86_64] Error 2
make[2]: Leaving directory '/opt/epics/example/exampleApp/src'
/opt/epics/base/configure/RULES_DIRS:70: recipe for target 'src.install' failed
make[1]: *** [src.install] Error 2
make[1]: Leaving directory '/opt/epics/example/exampleApp'
/opt/epics/base/configure/RULES_DIRS:70: recipe for target 'exampleApp.install' failed
make: *** [exampleApp.install] Error 2

I contacted with the CAEN supports as Eric Norum said that, and I'm waiting for it. Until that time, if there is another suggestions, I will be really glad to know..

Thanks in advance..
Best Regards..

Hulusi

2016-07-29 8:48 GMT+03:00 Ford, Christopher <[email protected]<redir.aspx?REF=8q85nb-Es2ZlkFvxf7Ql3ylLBpUL3qtnPnok4MAua1gwxevV-7nTCAFtYWlsdG86Y2FmQHNsYWMuc3RhbmZvcmQuZWR1><redir.aspx?REF=IHzPgOXIEFxvFhJIfWKwqCHTCo0ZUMGK2V0gZNuYYpzI3COVtLfTCAFtYWlsdG86Y2FmQHNsYWMuc3RhbmZvcmQuZWR1>>:

At SLAC we recently evaluated the CAEN DT5730 Digitizer with an eye toward creating EPICS asyn driver support for it.

We used the DT5730's optical interface (by way of the CAEN A3818 optical controller) instead of USB.


CAEN provides C libraries for communicating with their digitizers.  In our experience, these libraries took care of the low-level protocol details.


I haven't tried the digitizer's USB connection.  Check out the CAEN A3818 if you want maximum performance from your DT5730.


Thanks,

 -Chris Ford

  SLAC


________________________________
From: [email protected]<redir.aspx?REF=w84iECr0gHZWG1ezAdLxavrVrZHpxT4j7Wa3Qo1cM3swxevV-7nTCAFtYWlsdG86dGVjaC10YWxrLWJvdW5jZXNAYXBzLmFubC5nb3Y.><redir.aspx?REF=7Oie6FFUQRTIz8-tZSaWNgj2EA4TuOs75O4irdhQD8jI3COVtLfTCAFtYWlsdG86dGVjaC10YWxrLWJvdW5jZXNAYXBzLmFubC5nb3Y.> <[email protected]<redir.aspx?REF=w84iECr0gHZWG1ezAdLxavrVrZHpxT4j7Wa3Qo1cM3swxevV-7nTCAFtYWlsdG86dGVjaC10YWxrLWJvdW5jZXNAYXBzLmFubC5nb3Y.><redir.aspx?REF=7Oie6FFUQRTIz8-tZSaWNgj2EA4TuOs75O4irdhQD8jI3COVtLfTCAFtYWlsdG86dGVjaC10YWxrLWJvdW5jZXNAYXBzLmFubC5nb3Y.>> on behalf of Eric Norum <[email protected]<redir.aspx?REF=xn_dJgwadEWp8WsYTkQiNHqNVSonIvXZVD8fUaFHx-8wxevV-7nTCAFtYWlsdG86ZXJpY0Bub3J1bS5jYQ..><redir.aspx?REF=fG7Fkm2HrT0ywGWEp8eihOGpGBih02ithZJ5sGw_uunI3COVtLfTCAFtYWlsdG86ZXJpY0Bub3J1bS5jYQ..>>
Sent: Thursday, July 28, 2016 7:04 AM
To: Hulusi Öz
Cc: tech-talk
Subject: Re: Epics-Digitizer Communication

The error is indicating that the CAEN device is not a POSIX termios serial port and as such doesn’t accept the ioctl commands to set things like input timeout limits.  I have no idea about the CAEN device protocol.  If it happens to be USBTMC you could use the support for that this is part of ASYN.  Otherwise you’ll have to contact the CAEN folks and see what support they provide for EPICS.

On Jul 27, 2016, at 10:52 PM, Hulusi Öz <[email protected]<redir.aspx?REF=NCRLsicWEiHm-2mhS-erbYxVUMtVd-9QbQ8pHme9SAswxevV-7nTCAFtYWlsdG86aHVsdXNpLm96MUBnbWFpbC5jb20.><redir.aspx?REF=2df_aqKnfKAog1CVIKQ3xFfhvTymaRSEHPLFtEXpIgUqPiaVtLfTCAFtYWlsdG86aHVsdXNpLm96MUBnbWFpbC5jb20.>> wrote:

Hi Sir,

I have a few question about communication between Epics and Digitizer (manufactured by CAEN).
I tried to write a basic protocol files that just read analog input,but I don't know that it's true or not. Here it is :

Terminator = LF;
get_analog {
    in " %f";
    ExtraInput = Ignore;
}
It worked for Arduino. I can get analog values and monitor them on the terminal.
I want to use this in CAEN Digitizer,since I could deal with the Arduino,I suppose..
But,the thing is that when I connect the digitizer to the computer via USB, the IOC output says like that :

2016/07/27 09:28:55.056528 SERIALPORT SERIALPORT:input: asynError in read: Can't set "/dev/v1718_0" c_cc[VTIME]: Inappropriate ioctl for device
2016/07/27 09:28:55.056871 SERIALPORT SERIALPORT:input: I/O error after reading 0 bytes: ""
2016/07/27 09:28:55.056913 SERIALPORT SERIALPORT:input: Protocol aborted
2016/07/27 09:28:55.556477 SERIALPORT SERIALPORT:input: asynError in read: Can't set "/dev/v1718_0" c_cc[VTIME]: Inappropriate ioctl for device

I installed the CAEN driver for this product (Digitizer DT 5730 in <http://www.caen.it/csite/CaenProd.jsp?parent=14&idmod=757<redir.aspx?REF=8S209k7WJkxJ84WNpBsIhFK5oaq3dzXHkKuV2n9NsXYwxevV-7nTCAFodHRwOi8vd3d3LmNhZW4uaXQvY3NpdGUvQ2FlblByb2QuanNwP3BhcmVudD0xNCZpZG1vZD03NTc.><redir.aspx?REF=t1tbwaw0QIs8Fmgup-Wt7VXjvNfNs3U3_O6_k5bXHV4qPiaVtLfTCAFodHRwOi8vd3d3LmNhZW4uaXQvY3NpdGUvQ2FlblByb2QuanNwP3BhcmVudD0xNCZpZG1vZD03NTc.>>) at the path "/lib/modules/4.4.0-31-generic/kernel/drivers" . When I connect it, to learn which port number that it uses , v1718_0
The way I learnt it is that :

ls /dev > notplugged // then I plug the Arduino
ls /dev > plugged
diff notplugged plugged.

Its result for the Arduino says, Serial /ttymACM0,and it works. However the result for the Digitizer says, USB /v1718_0 .
I am using Asyn Driver and StreamDevice.. I don't know that should I use another extensions or support for this product: I search on this website but I couldn't find..

Thanks in advance, sir..
Regards..

Hulusi Oz

--
Eric Norum
[email protected]<redir.aspx?REF=xn_dJgwadEWp8WsYTkQiNHqNVSonIvXZVD8fUaFHx-8wxevV-7nTCAFtYWlsdG86ZXJpY0Bub3J1bS5jYQ..><redir.aspx?REF=CX5KSNTq4DQ0iicWgZQDG2s8SvpI6laHs83odfIk4tgqPiaVtLfTCAFtYWlsdG86ZXJpY0Bub3J1bS5jYQ..>









Replies:
Re: Epics-Digitizer Communication Hulusi Öz
References:
Re: Epics-Digitizer Communication Eric Norum
Re: Epics-Digitizer Communication Ford, Christopher
Re: Epics-Digitizer Communication Hulusi Öz
Re: Epics-Digitizer Communication Hulusi Öz
RE: Epics-Digitizer Communication Mark Rivers
Re: Epics-Digitizer Communication Hulusi Öz

Navigate by Date:
Prev: Re: Epics-Digitizer Communication Hulusi Öz
Next: Can an IOC receive/process CIP data? Lane, Randy
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  <20162017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: Epics-Digitizer Communication Hulusi Öz
Next: Re: Epics-Digitizer Communication Hulusi Öz
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  <20162017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 08 Aug 2016 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·