From: Markthomas on
Hello all,

I am embarking on a journey to attach a MarCator digital
indicator to matlab for data processing. The issue i am
having is connecting the MarCator (with its built in FTDI
chip) to be controlled by matlab. There are sample codes
of it for c++ and VB. the FTD2XX.DLL is avalable from
their site. Any ideas on how to go about doing this?

http://www.ftdichip.com/Projects/CodeExamples.htm

MT


From: Freelance Embedded Systems Engineer on
Markthomas wrote:
> Hello all,
> I am embarking on a journey to attach a MarCator digital
> indicator to matlab for data processing. The issue i am
> having is connecting the MarCator (with its built in FTDI
> chip) to be controlled by matlab. There are sample codes
> of it for c++ and VB. the FTD2XX.DLL is avalable from
> their site. Any ideas on how to go about doing this?
>
> http://www.ftdichip.com/Projects/CodeExamples.htm
> MT

Why do you feel the need to use the D2XX drivers instead of the Virtual Comm Port (VCP) driver? If you use the VCP drivers, you'll be able to access the device directly from within Matlab using the Matlab serial port I/O commands.

If you use the D2XX DLL, I believe you'll have to either write a MEX/DLL wrapper for each D2XX function OR use the Matlab commands that allow you to access DLLs directly. See the Matlab documentation associated with loadlibrary() and calllib(). Also, check out the following discussion by chrisdaw on the codeproject.com website:

"Connecting MATLAB to C-language DLL's"
http://www.codeproject.com/KB/DLL/matlabconnector.aspx

From: Markthomas on
Freelance Embedded Systems Engineer <g9u5dd43(a)yahoo.com>
wrote in message <4864F023.1070601(a)yahoo.com>...
> Markthomas wrote:
> > Hello all,
> > I am embarking on a journey to attach a MarCator
digital
> > indicator to matlab for data processing. The issue i
am
> > having is connecting the MarCator (with its built in
FTDI
> > chip) to be controlled by matlab. There are sample
codes
> > of it for c++ and VB. the FTD2XX.DLL is avalable from
> > their site. Any ideas on how to go about doing this?
> >
> > http://www.ftdichip.com/Projects/CodeExamples.htm
> > MT
>
> Why do you feel the need to use the D2XX drivers instead
of the Virtual Comm Port (VCP) driver? If you use the VCP
drivers, you'll be able to access the device directly from
within Matlab using the Matlab serial port I/O commands.
>
> If you use the D2XX DLL, I believe you'll have to either
write a MEX/DLL wrapper for each D2XX function OR use the
Matlab commands that allow you to access DLLs directly.
See the Matlab documentation associated with loadlibrary()
and calllib(). Also, check out the following discussion by
chrisdaw on the codeproject.com website:
>
> "Connecting MATLAB to C-language DLL's"
>
http://www.codeproject.com/KB/DLL/matlabconnector.as
px
>

If i use the VCP do i have to use any special commands to
communicate with the indicator and tell it to give me a
value and then recieve the value?



From: Markthomas on
"Markthomas " <uebermenchens(a)yahoo.com> wrote in message
<g42rum$1bi$1(a)fred.mathworks.com>...
> Freelance Embedded Systems Engineer <g9u5dd43(a)yahoo.com>
> wrote in message <4864F023.1070601(a)yahoo.com>...
> > Markthomas wrote:
> > > Hello all,
> > > I am embarking on a journey to attach a MarCator
> digital
> > > indicator to matlab for data processing. The issue i
> am
> > > having is connecting the MarCator (with its built in
> FTDI
> > > chip) to be controlled by matlab. There are sample
> codes
> > > of it for c++ and VB. the FTD2XX.DLL is avalable
from
> > > their site. Any ideas on how to go about doing this?
> > >
> > > http://www.ftdichip.com/Projects/CodeExamples.htm
> > > MT
> >
> > Why do you feel the need to use the D2XX drivers
instead
> of the Virtual Comm Port (VCP) driver? If you use the
VCP
> drivers, you'll be able to access the device directly
from
> within Matlab using the Matlab serial port I/O commands.
> >
> > If you use the D2XX DLL, I believe you'll have to
either
> write a MEX/DLL wrapper for each D2XX function OR use the
> Matlab commands that allow you to access DLLs directly.
> See the Matlab documentation associated with loadlibrary
()
> and calllib(). Also, check out the following discussion
by
> chrisdaw on the codeproject.com website:
> >
> > "Connecting MATLAB to C-language DLL's"
> >
> http://www.codeproject.com/KB/DLL/matlabconnector.as
> px


If i use the VCP do i have to use any special commands to
communicate with the indicator and tell it to give me a
value and then recieve the value?


From: Freelance Embedded Systems Engineer on
Markthomas wrote:
> Freelance Embedded Systems Engineer <g9u5dd43(a)yahoo.com>
> wrote in message <4864F023.1070601(a)yahoo.com>...
>> Markthomas wrote:
>>> I am embarking on a journey to attach a MarCator digital
>>> indicator to matlab for data processing. The issue i am
>>> having is connecting the MarCator (with its built in FTDI
>>> chip) to be controlled by matlab. There are sample codes
>>> of it for c++ and VB. the FTD2XX.DLL is avalable from
>>> their site. Any ideas on how to go about doing this?
>>>
>>> http://www.ftdichip.com/Projects/CodeExamples.htm
>>> MT

>> Why do you feel the need to use the D2XX drivers instead
>> of the Virtual Comm Port (VCP) driver? If you use the VCP
>> drivers, you'll be able to access the device directly from
>> within Matlab using the Matlab serial port I/O commands.
>> If you use the D2XX DLL, I believe you'll have to either
>> write a MEX/DLL wrapper for each D2XX function OR use the
>> Matlab commands that allow you to access DLLs directly.
>> See the Matlab documentation associated with loadlibrary()
>> and calllib(). Also, check out the following discussion by
>> chrisdaw on the codeproject.com website:
>> "Connecting MATLAB to C-language DLL's"
>> http://www.codeproject.com/KB/DLL/matlabconnector.aspx


> If i use the VCP do i have to use any special commands to
> communicate with the indicator and tell it to give me a
> value and then recieve the value?

The FTDI interface is nearly the same either way, but you'll have to
know the MarConnect communicaiton protocol which you should be able to
get from the vendor. If not, don't buy it unless you are planning
to reverse engineer their communication protocol.