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: Re: Thorlabs USB Hardare with EPICS
From: Eric Norum <[email protected]>
To: Mark Rivers <[email protected]>
Cc: Florian Sorgenfrei <[email protected]>, "[email protected] Tech-Talk" <[email protected]>
Date: Wed, 21 Aug 2013 10:52:29 -0700
Very interesting.
The presence of the USBTMC_ATTRIB_TIMEOUT IOCTL makes things a *lot* easier.     No poll()/select() work needed.
The actual driver looks to be quite simple.   I'd be happy to assist.   Can we get a group together to work on this?  I don't have any hardware to work with, but I' could perhaps provide some code as a starting point.

On Aug 21, 2013, at 10:28 AM, Mark Rivers <[email protected]> wrote:

Hi Florian,
 
You would need to write an asyn port driver that is specific to USBTMC.  USBTMC is basically like GPIB over USB.  This driver will be similar to the VXI-11 driver, which is basically GPIB over Ethernet. 
 
That driver would implement the asynOctet interface, just like the drvAsynSerialPort driver does.  That should not be difficult.  You need to implement the ioctl for special operations. 
 
The following is from this document:
 
 
 
********************************
ioctl(2): Special operations
 
As show in the above examples, ioctl(2) is used for special operations (everything that goes beyond text-based communication). The second parameter to ioctl(2) is a request code which indicates what kind of special operation you want the driver to perform. Valid request codes are defined in usbtmc.h. They are:
 
USBTMC_IOCTL_GET_CAPABILITIES
This request is used to get information about the device's capabilities. In this case, the third parameter to ioctl(2) is a pointer to a structure of type struct usbtmc_dev_capabilities (defined in usbtmc.h). This structure is filled by ioctl. See usbtmc.h and the USBTMC specification for details.
 
USBTMC_IOCTL_INDICATOR_PULSE
This request asks the device to light its activity indicator for identification purposes. This is an optional capability and may not be available with your device. Inspect the device's capability values when in doubt. In this case, the third parameter to ioctl(2) is not used.
 
USBTMC_IOCTL_CLEAR
This request is used to clear the device's input and output buffers. It is roughly equivalent to a GPIB device clear. In this case, the third parameter to ioctl(2) is not used.
 
USBTMC_IOCTL_ABORT_BULK_OUT
This requests aborts the last USBTMC BULK OUT operation, i.e. the last write operation to the device's command buffer. It is used to recover from I/O errors that occur during a write operation. Note that you can instruct the driver to do the abort automatically if an I/O error occurs. See Reference: Attributes for details. In this case, the third parameter to ioctl(2) is not used.
********************************
 
Mark
-- 
Eric Norum
[email protected]


References:
Re: Thorlabs USB Hardare with EPICS Sorgenfrei, Florian
RE: Thorlabs USB Hardare with EPICS Mark Rivers

Navigate by Date:
Prev: Re: query ioc/cas for list of channels Jameson Graef Rollins
Next: autosave per-db req files Stubbs, Scott A.
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: Thorlabs USB Hardare with EPICS Mark Rivers
Next: Kohzu SC410 Controller Gomella, Andrew (NIH/NHLBI) [F]
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 ·