Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
equipment:odd:writing_to_accesio_june_2021 [2021/06/19 10:37] – created jefferis | equipment: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_UsbValidateDeviceIndex | + | |
- | AIO_Usb_DIO_ReadAll | + | |
- | AIO_Usb_WriteAll | + | |
- | 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? | ||
+ | < | ||
// AcessIO_LinuxUsbAPI | // AcessIO_LinuxUsbAPI | ||
// | // | ||
Line 37: | Line 38: | ||
// Author : | // Author : | ||
// History : | // History : | ||
+ | </ | ||
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:// | https:// | ||
+ | |||
# extensions to your API | # extensions to your API | ||
https:// | https:// | ||
+ | |||
# your API | # your API | ||
https:// | https:// | ||
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:// | ||
+ | |||
+ | There will be minor edits necessary to this file; specifically, | ||
+ | |||
+ | 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' | ||
+ | |||
+ | Sincerely, | ||
+ | John Hentges | ||
+ | JHentges@accesio.com | ||
+ | Director of Digital Design and Software Engineering | ||
+ | |||
+ | -----Original message----- | ||
+ | From: Dr Gregory Jefferis < | ||
+ | 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. |