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

Subject: PTP/MTP/libgphoto2 camera triggering + EPICS?
From: "Gomella, Andrew (NIH/NHLBI) [F]" <[email protected]>
To: "[email protected]" <[email protected]>
Date: Tue, 8 Oct 2013 20:10:02 +0000
Hi Everyone,

I was wondering if anyone had any advice for triggering a USB attached camera which follows the "Picture Transfer Protocol" / PTP (ISO15740) http://en.wikipedia.org/wiki/Picture_Transfer_Protocol which is now also known as "Media Transfer Protocol" with EPICS on windows?

There already is extensive linux support for these cameras in libgphoto2 which works for hundreds of mostly "consumer grade" cameras. http://www.gphoto.org/proj/libgphoto2/support.php There are applications such as "entangle" which allow control of camera settings and also live view feeds of the camera, as well as the command line application gphoto2.

Right now I use an open source application on windows to control the camera. (digicamcontrol http://digicamcontrol.com/)  Here all the hard work is already done because I can control all of the camera's settings, and manually trigger captures as well as view a live stream on windows. However, I would like to make the camera trigger as a PV, such that I can do automated scans in combination with motor stepping etc.

I managed to accomplish this on linux by combining python ptp bindings and code from the out of date pyptp project on google code (pyptp) with pcaspy such that a capture would be triggered when the PV was accessed. However this has proved impossible for me to get to work on windows (after hours of struggling with libusb, pyusb, and the outdated pyptp I realized it was not going to work) I could keep two separate machines and switch the usb cable from the camera whenever I need epics to run a scan, however I believe a more elegant solution exists.

I thought I found the solution when I found that digicamcontrol and another program "controlmynikon" both have built in webservers which allow the camera to be triggered. Then I used pcaspy again to access the URL such that the camera would fire. I realize however that this will not work as EPICS would be completely blind to the cameras busy or not busy status, and thus send capture signals without realizing the camera is busy with a previous capture.

I believe the best solution would be a full epics driver utilizing libgphoto2 and the work already done in the area detector plugin, but my programming expertise is nowhere near where it needs to be to implement this. I did download the areadetector source hoping I could work my way towards simply implementing a PV for firing the camera but was overwhelmed.

Has anyone else ventured into this territory? Anyone using a DSLR or similar camera at their beam-line for scientific/ security/ monitoring reasons? I was surprised a search of tech-talk yielded no results for  "ptp camera" given the number of cameras supported (though they are not "scientific grade" so that may explain it).



Thanks in advance for any help or advice you may have,

Andrew Gomella




Replies:
RE: PTP/MTP/libgphoto2 camera triggering + EPICS? Mark Rivers

Navigate by Date:
Prev: EPICS Training Dalesio, Leo
Next: Re: how to issue a shell command from EPICS record ? Pearson, Matthew R.
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: RE: EPICS Training Zimoch Elke
Next: RE: PTP/MTP/libgphoto2 camera triggering + EPICS? Mark Rivers
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 20 Apr 2015 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·