Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
equipment:odd:writing_to_accesio_june_2021 [2021/06/19 10:37] – created jefferisequipment:odd:writing_to_accesio_june_2021 [2021/09/16 16:41] (current) – [Response 2] jefferis
Line 9: Line 9:
 We only use a pretty small subset of your API including  We only use a pretty small subset of your API including 
  
-AIO_Init +  * AIO_Init 
-AIO_Usb_GetDevices +  AIO_Usb_GetDevices 
-AIO_UsbValidateDeviceIndex +  AIO_UsbValidateDeviceIndex 
-AIO_Usb_DIO_ReadAll +  AIO_Usb_DIO_ReadAll 
-AIO_Usb_WriteAll +  AIO_Usb_WriteAll 
-getDevHandle+  getDevHandle
  
-// we also wrote a couple of custom functions which accept an already initialised libusb handle for speed rather than intialising every time. I'm not sure if you now have this kind of functionality built in. +We also wrote a couple of custom functions which accept an already initialised libusb handle for speed rather than intialising every time. I'm not sure if you now have this kind of functionality built in. 
  
 AIO_Usb_WriteAllH AIO_Usb_WriteAllH
Line 23: Line 23:
 2. In porting our/mac linux code using this AcessIO_LinuxUsbAPI to Windows is there anything we should look out for? 2. In porting our/mac linux code using this AcessIO_LinuxUsbAPI to Windows is there anything we should look out for?
  
 +<code>
 //       AcessIO_LinuxUsbAPI  //       AcessIO_LinuxUsbAPI 
 //   //  
Line 37: Line 38:
 //  Author :  Jeff Price //  Author :  Jeff Price
 //  History :  11/06/2009 created //  History :  11/06/2009 created
 +</code>
  
 3. if I do need to compile a new DLL (to access via anaconda python with ctypes) that has a small amount of custom C code on top of your library, what compiler etc setup would you recommend?  3. if I do need to compile a new DLL (to access via anaconda python with ctypes) that has a small amount of custom C code on top of your library, what compiler etc setup would you recommend? 
Line 47: Line 49:
 # main entry point # main entry point
 https://github.com/jefferislab/ODDXOP/blob/master/XFUNC3.c https://github.com/jefferislab/ODDXOP/blob/master/XFUNC3.c
 +
 # extensions to your API # extensions to your API
 https://github.com/jefferislab/ODDXOP/blob/master/aioUsbExts.c https://github.com/jefferislab/ODDXOP/blob/master/aioUsbExts.c
 +
 # your API # your API
 https://github.com/jefferislab/ODDXOP/blob/master/Xcode/aioUsbApi.c https://github.com/jefferislab/ODDXOP/blob/master/Xcode/aioUsbApi.c
Line 56: Line 60:
 Greg Jefferis, Greg Jefferis,
 Cambridge, UK. Cambridge, UK.
 +
 +
 +====== Response 1 ======
 +:
 +
 +Hi Gregory,
 +
 +We do not yet offer Python as an officially supported language (that is, a language for which we provide working sample programs for the majority of our products).
 +
 +However, we are in the process of adding Python to our list of supported languages.
 +
 +You can grab a ctypes wrapper for the Windows AIOUSB.dll here: https://accesio.com/files/AIOUSB.py
 +
 +There will be minor edits necessary to this file; specifically, make sure the DLL is being loaded from a valid location.
 +
 +If you run into any issues just let me know and I'll provide what assistance I can.
 +
 +Sincerely,
 +John Hentges
 +JHentges@accesio.com
 +Director of Digital Design and Software Engineering
 +
 +
 +====== Response 2 ======
 +
 +Hi Gregory,
 +
 +AIO_Init(), and libusb itself, are not used in Windows.
 +
 +Our Windows API Library (AIOUSB.dll) doesn't support libusb, and instead uses CyUSB.sys (or CyUSB3.sys) as its driver component.
 +
 +Sincerely,
 +John Hentges
 +JHentges@accesio.com
 +Director of Digital Design and Software Engineering
 +
 +-----Original message-----
 +From: Dr Gregory Jefferis <jefferis@mrc-lmb.cam.ac.uk>
 +Sent: 06/21/2021 09:37:56
 +
 +Dear John,
 +
 +Many thanks for you message. I very much appreciate your quick response.
 +
 +The AIOUSB.py sample file you linked will be very useful. Two questions
 +
 +1. Is AIO_Init() still necessary? I see it is not wrapped.
 +
 +2. Do you have any thoughts about whether it will be possible to get
 +/
 +work with an initialised lib_usb handle on the python side? In the
 +past
 +reusing handles make things run much faster.
 +
 +Thank you again,
 +
 +Greg.

Log In