Hi David,
I have imported the latest USB-1608G and USB-3100 files from Warren Jasper’s repository into measComp/measCompApp/Linux_Drivers/. I modified them to add device-specific
prefixes to all of the symbolic constants in the .h files. This is needed to avoid conflicts with cbw.h from Measurement Computing, and to avoid conflicts between Warren’s drivers themselves. For example, in his original drivers DIFFERENTIAL is defined differently
in these files for different versions of the USB-1608:
usb-1608G.h:#define DIFFERENTIAL 1
usb-1608HS.h:#define DIFFERENTIAL (0x0)
Thus if a single source file needed to use both of those drivers it would not work.
DIFFERENTIAL is defined as follows in cbw.h:
#define DIFFERENTIAL 0
This thus conflicts with usb-1608G.h, and both of those include files will be needed in the mcBoard_USB-1608G that you are writing.
I normally feed my fixes back to him so they are in a future release.
I suggest you pull the master branch of measComp before working more on your driver.
Mark
From: Dudley, David <dudleyd at frib.msu.edu>
Sent: Friday, October 22, 2021 7:32 PM
To: Mark L Rivers <riv6 at uchicago.edu>
Cc: Hu, Yong <yhu at bnl.gov>; tech-talk at aps.anl.gov
Subject: Re: Measurement Computing USB-1608G_2AO support
Yes, I have a working version of it, and I am working on making sure that it works properly.
I can read all the analog inputs, and they all seem to be correct and scanning correctly, next week I plan on working on the analog outputs, the counters, and the waveform generator. The thing does so much it’s just a lot to manage quickly.
I’ll let you know as soon as I am farther along on getting the completed version, and submit it either back on github or I’ll just email it directly to you.
Personally, I’m very interested in the USB-2500 for the next device I want to get supported.
[EXTERNAL] This email originated from outside of FRIB
Hi David,
Are you working on the mcBoard_USB-1608G.cpp glue layer I proposed? If you put it on github I’ll be happy to take a look and collaborate via pull-requests when you are
ready. This is a board that has been on my to-do list.
I am about to start working on Linux support for the USB-3105 which has 16 analog outputs and 8 digital I/O for $550.
Mark
It seems a pretty interesting device, and I’ve used it a lot using the windows software it comes with. I’m starting to get close on having the Linux support finished for it so I can then use it in Linux EPICS systems.
Hope it works as good.
[EXTERNAL] This email originated from outside of FRIB
Hi Yong,
Note that the analog outputs can also be triggered, getting their values from an waveform record. So it can be used as an inexpensive waveform generator, up to 500 kHz
for a single output or 250 kHz 2 outputs.
Mark
Hi Yong,
The USB-1608G_2A0 accepts a TTL trigger. It can thus be used as an inexpensive waveform digitizer using either the internal clock, or an external trigger to collect the next sample. It can digitize a single input at 500 kHz, 2 channels
at 250kHz, etc.
Mark
Hi Mark, David, etc.:
Those modules seem amazing. Do you know any analog I/O modules accept external trigger, i.e. it has an TTL trigger input?
Thanks,
Yong
Hi David,
The high level EPICS software already exists in this file, which works on both Linux and Windows.
https://github.com/epics-modules/measComp/blob/master/measCompApp/src/drvMultiFunction.cpp
The low-level Linux driver for the USB-1608G-2A0, written by Warren Jasper, also already exists:
https://github.com/wjasper/Linux_Drivers/blob/master/USB/mcc-libusb/usb-1608G.c
All that needs to be done is to write the “glue layer”, which is the derived class mcBoard_USB-1608G.cpp, in this directory:
https://github.com/epics-modules/measComp/tree/master/measCompApp/cbw_linuxSrc
There are lots of examples, including the mcBoard_E-1608.cpp that can be used as a starting point.
Mark
Anyone implemented support for these device under Linux? measComp module looked real promising until read that only certain modules are supported under Linux, and this one is not one of them.
Later-
David Dudley
Controls Engineer III
Facility for Rare Isotope Beams
Michigan State University
640 South Shaw Lane
East Lansing, MI 48824-1321, USA
Tel. 517-908-7133
Email: dudleyd@frib.msu.edu
|
|
|