hi all,
is it possible to do data acquistion without dac tool box
in matlab.
i want to read in usb into matlab while i dont have data
acquistion tool installed.
best regards.
On Feb 7, 5:29=A0am, "muzaffar " <muzaffarbas...@yahoo.com> wrote:
> hi all,
> is it possible to do data acquistion without dac tool box
> in matlab.
> i want to read in usb into matlab while i dont have data
> acquistion tool installed.
> best regards.
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D
muzaffar:
I highly recommend products by Measurement Computing http://www.measurementcomputing.com/
Although they work with MATLAB's toolbox, you could avoid that. I use
them via Visual Basic. You could write a program in Visual Basic
(which is much nicer for developing user interfaces than GUIDE
anyway), and then talk to the Measurement Computing device via USB,
and talk to MATLAB also. You'd convert your MATLAB code to a library
that you can call via Visual Basic with the Mathworks MATLAB Builder
for .Net. http://www.mathworks.com/products/netbuilder/
"muzaffar " <muzaffarbashir@yahoo.com> wrote in message
<foemhe$nvi$1@fred.mathworks.com>...
> hi all,
> is it possible to do data acquistion without dac tool box
> in matlab.
> i want to read in usb into matlab while i dont have data
> acquistion tool installed.
> best regards.
>
Yes, you can write your own C level code that access the USB
and then make it a dll and call it in Matlab.
Vihang
anybody knows about c level code for usb access?
please give me link to start?
"muzaffar " <muzaffarbashir@yahoo.com> wrote in message
<foemhe$nvi$1@fred.mathworks.com>...
> hi all,
> is it possible to do data acquistion without dac tool
box
> in matlab.
> i want to read in usb into matlab while i dont have data
> acquistion tool installed.
> best regards.
>
On Feb 8, 4:07=A0am, "muzaffar " <muzaffarbas...@yahoo.com> wrote:
> anybody knows about c level code for usb access?
> please give me link to start?
>
> "muzaffar " <muzaffarbas...@yahoo.com> wrote in message
>
> <foemhe$nv...@fred.mathworks.com>...
>
>
>
> > hi all,
> > is it possible to do data acquistion without dac tool
> box
> > in matlab.
> > i want to read in usb into matlab while i dont have data
> > acquistion tool installed.
> > best regards.- Hide quoted text -
>
> - Show quoted text -
This company has all kinds of measurement device that work off USB and
they give you free sample code and free telephone help. http://www.measurementcomputing.com/
Regards,
ImageAnalyst
P.S. Did you see my other reply to your message?
ImageAnalyst <imageanalyst@mailinator.com> wrote in message
<8251cff5-dba2-429f-b4f4-
d0b4f65736a7@c4g2000hsg.googlegroups.com>...
> On Feb 8, 4:07=A0am, "muzaffar "
<muzaffarbas...@yahoo.com> wrote:
> > anybody knows about c level code for usb access?
> > please give me link to start?
> >
> > "muzaffar " <muzaffarbas...@yahoo.com> wrote in message
> >
> > <foemhe$nv...@fred.mathworks.com>...
> >
> >
> >
> > > hi all,
> > > is it possible to do data acquistion without dac tool
> > box
> > > in matlab.
> > > i want to read in usb into matlab while i dont have
data
> > > acquistion tool installed.
> > > best regards.- Hide quoted text -
> >
> > - Show quoted text -
>
> This company has all kinds of measurement device that
work off USB and
> they give you free sample code and free telephone help.
> http://www.measurementcomputing.com/
> Regards,
> ImageAnalyst
> P.S. Did you see my other reply to your message?
I have used Measurement Computing USB devices via the
Matlab generic dll interface without any problems. Just
have to be sure you get the dll and header file, which was
included in the application software we received.
double *ptr_my_vid, *ptr_my_pid, *ptr_my_configuration,
*ptr_my_interface;
int my_vid, my_pid, my_configuration, my_interface;
int bytes_write, bytes_read;
int i,j;
unsigned short cTmp[CTMP_SIZE]={0};
double *y;
double *x;
xUSBMessage sxUSBMessage;
plhs[0]=mxCreateDoubleMatrix(1, 1, mxREAL);
plhs[1]=mxCreateDoubleMatrix
(DATA_BUF_SIZE,TOTAL_CHANNELS_NUMBER_BUFF, mxREAL);
y = mxGetPr(plhs[0]);
x = mxGetPr(plhs[1]);
// reset values
y[0]=0;
for (i=0;i<TOTAL_CHANNELS_NUMBER_BUFF;i++)
for (j=0;j<DATA_BUF_SIZE;j++)
x[(i*DATA_BUF_SIZE)+j]=0;
/* Check for proper number of input and output
arguments */
/* my_vid, my_pid, my_configuration, my_interface */
if (nrhs ==4) {
ptr_my_interface = mxGetPr(prhs[3]);
ptr_my_configuration = mxGetPr(prhs[2]);
ptr_my_pid = mxGetPr(prhs[1]);
ptr_my_vid = mxGetPr(prhs[0]);
my_interface = (int)(*ptr_my_interface);
my_configuration = (int)(*ptr_my_configuration);
my_pid = (int)(*ptr_my_pid);
my_vid = (int)(*ptr_my_vid);
}
else if (nrhs ==3)
{
my_interface=0;
// change endian and write to matlab
if(bytes_read==sizeof( cTmp))
for (i=0;i<TOTAL_CHANNELS_NUMBER_BUFF;i++)
for (j=0;j<DATA_BUF_SIZE;j++)
x[(i*DATA_BUF_SIZE)+j]
=SHORT_little_endian_TO_big_endian(cTmp[(i*DATA_BUF_SIZE)
+j]);
// get byte read if 1 still no full buffer
y[0]=bytes_read;
"muzaffar " <muzaffarbashir@yahoo.com> wrote in message
<foemhe$nvi$1@fred.mathworks.com>...
> hi all,
> is it possible to do data acquistion without dac tool box
> in matlab.
> i want to read in usb into matlab while i dont have data
> acquistion tool installed.
> best regards.
Any acquisition tool that comes with a DLL and header (.h)
file can be used in Matlab without the DAQ toolbox. I have
personally had excellent success using a Data Translation
DT9812 A/D tool via USB. Implementation was as simple as
reading the SDK manual, then accessing the DLL via Matlab's
generic loadlibrary, callib, libpointer, and setdatatype
functions (some minor tweaking was needed in DT's SDK header
files for Matlab/DLL compatibility, because of a few DT
coding errors...).
"Yair Altman" <altmanyDEL@gmailDEL.comDEL> wrote in message
<foooo2$i0a$1@fred.mathworks.com>...
> "muzaffar " <muzaffarbashir@yahoo.com> wrote in message
> <foemhe$nvi$1@fred.mathworks.com>...
> > hi all,
> > is it possible to do data acquistion without dac tool
box
> > in matlab.
> > i want to read in usb into matlab while i dont have
data
> > acquistion tool installed.
> > best regards.
>
> Any acquisition tool that comes with a DLL and header (.h)
> file can be used in Matlab without the DAQ toolbox. I have
> personally had excellent success using a Data Translation
> DT9812 A/D tool via USB. Implementation was as simple as
> reading the SDK manual, then accessing the DLL via
Matlab's
> generic loadlibrary, callib, libpointer, and setdatatype
> functions (some minor tweaking was needed in DT's SDK
header
> files for Matlab/DLL compatibility, because of a few DT
> coding errors...).
>
> Yair Altman
> http://ymasoftware.com
>
I had bad experiment with loadlibrary
if the DLL load and run with loadlibrary
stay with that
if not do it other way (like I did)
the loadlibrary I tried had problem with struct holding
pointer to structs and other
"Natanel " <jn_eizenberg@hotmail.com> wrote in message
<foslc7$2q1$1@fred.mathworks.com>...
> muzaffar I answered you personal
> lookat your mail
Dear Nantanel,
I have a question about your code c usb interface, can you
explain more the lines code
best regards
"Rafik hajrya" <led.rafik@gmail.com> wrote in message
<fr326l$3ud$1@fred.mathworks.com>...
> "Natanel " <jn_eizenberg@hotmail.com> wrote in message
> <foslc7$2q1$1@fred.mathworks.com>...
> > muzaffar I answered you personal
> > lookat your mail
> Dear Nantanel,
> I have a question about your code c usb interface, can
you
> explain more the lines code
> best regards
Public Submission Policy
NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for
all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content.
Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available
via MATLAB Central. Read the complete Disclaimer prior to use.