LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Question about usb in labview

I am currently doing a project about designing standalone data acquisition module with USB 2.0 interface.

For the hardware, a USB FIFO chip(FT245BM) is used to communicate with PC via USB with the driver DLL provided by the manufacturer (FTDI).

I want to use labview (version 7.0)to develop a data logging software and I learned that the functions in the DLL could be called by the 'library call function node' in labview.

My question is:
1.Apart from labview, do I need to intall Measurement and Automation Exploere to configure the hardware before I use it in the labview?

2. I noticed that the type of call in labview should be configured as either 'c' or 'stdcall'. My knowledge about C/C++ is poor, could someone explain them in
detail and which one shall I choose?

3.I heard that not all the DLLs could be used in labview (due to the problem of different format???). I don't quite understand about this. Could anyone be kind to explain about this as well?

Many thanks!!!
0 Kudos
Message 1 of 13
(5,694 Views)
Xiaohui wrote:

> I am currently doing a project about designing standalone data
> acquisition module with USB 2.0 interface.
>
> For the hardware, a USB FIFO chip(FT245BM) is used to communicate with
> PC via USB with the driver DLL provided by the manufacturer (FTDI).
>
> I want to use labview (version 7.0)to develop a data logging software
> and I learned that the functions in the DLL could be called by the
> 'library call function node' in labview.

I assume your chip comes with a Software Development Kit (SDK) with a
ready made driver. This driver consists of a kernel mode driver and the
user mode shared library (DLL). LabVIEWs call library node can be used
to call such user mode DLLs.

> My question is:
> 1.Apart from labview, do I need to intall Measurement and Automation
> Exploere to configure the hardware before I use it in the labview?

Very unlikely, as the driver which comes with your SDK for the chip will
be not configurable at all in Measurement & Automation Explorer (MAX).
MAX really is only to configure National Instruments hardware devices
and to some lesser extend external measurement devices connected through
the GPIB, VXI and PXI bus.

The NI-VISA driver 3.0 which comes in LabVIEW 7.0 can also directly
communicate with the raw USB interface of some devices. If you want to
use that interface you would NOT install the driver for that device and
would configure that device in MAX instead. You do need to know the
manufacturer ID and Device ID of your USB chip for that. Also the
programming in LabVIEW through the VISA functions is possible but it is
not very simple and completely dependant on the implemenation of the USB
communication by that chip. There are some documents on Developer
Exchange and also some discussion topics here on this forum about VISA
and USB communication.

> 2. I noticed that the type of call in labview should be configured as
> either 'c' or 'stdcall'. My knowledge about C/C++ is poor, could
> someone explain them in detail and which one shall I choose?

Most Windows DLLs use stdcall but this is not a must. If you get it
wrong you will simply crash LabVIEW. The documentation or if that
doesn't work the header file which comes with the DLL should give you
this information, although for the header file you need to know a little
C to understand where it shows this.

> 3.I heard that not all the DLLs could be used in labview (due to the
> problem of different format???). I don't quite understand about this.
> Could anyone be kind to explain about this as well?

Windows DLLs should be fairly standard. The only problem could be .Net
assemblies which are not really DLLs but a complete archive of DLL's
documentations, certificates and, and, and!
It's still very unlikely that a device would come with a .Net assembly
instead of a simple DLL with the according API.

Rolf Kalbermatter
Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
Message 2 of 13
(5,693 Views)
"Xiaohui" wrote in message
news:50650000000800000069D60000-1079395200000@exchange.ni.com...
> I am currently doing a project about designing standalone data
> acquisition module with USB 2.0 interface.
>
> For the hardware, a USB FIFO chip(FT245BM) is used to communicate with
> PC via USB with the driver DLL provided by the manufacturer (FTDI).
>
> I want to use labview (version 7.0)to develop a data logging software
> and I learned that the functions in the DLL could be called by the
> 'library call function node' in labview.
>
> My question is:
> 1.Apart from labview, do I need to intall Measurement and Automation
> Exploere to configure the hardware before I use it in the labview?
>

No

> 2. I noticed that the type of call in labview should be
configured as
> either 'c' or 'stdcall'. My knowledge about C/C++ is poor, could
> someone explain them in detail and which one shall I choose?
>

give My your E-Mail and you can get all what you need.
I have a FTDI application running with labview.

> 3.I heard that not all the DLLs could be used in labview (due to the
> problem of different format???). I don't quite understand about this.
> Could anyone be kind to explain about this as well?

I don't know that, I think only 16 Bit DLL's made problems.

Hansjoerg

hansjoerg_@spamhole.com
0 Kudos
Message 3 of 13
(5,694 Views)
Hi Hansjoerg,

I'm new using Labview and FTDI chips, and I'm having some problems in understanding how to start. For example I have no idea how to program the chip with Labview. Which driver to use: VCom or D2xxx? Do you think you can provide me your example vi as a starting point?

Regards,

Pedro
0 Kudos
Message 4 of 13
(5,693 Views)
Hi Hansjoerg,

I'm new using FTDI chips and I'm having some problems in understanding how to start, too.
I have a UMP2 (USB-Parallel FIFO Converter from asix, based on FT245BM chip). I have installed D2xxx and I have to generate SPI signals. I think I have to set bitbang mode but I have no idea how to proceed to program the I/O. Could you send me your example or a brief sequence of command to control the output
as a starting point?

Thanks

Regards,
Gian
0 Kudos
Message 5 of 13
(5,628 Views)
Hallo Hansjörg,
the same is true for me, but I would rather like to use LabVIEWs VISA fuctions (USB Raw) to communicate to our device (which also has a FTDI chip). I would really appreciate if you could send me your sample VI, too. Can you do this via this forum or will I have to post my email address here?
Thanks a lot in advance,
Gabs
0 Kudos
Message 6 of 13
(5,565 Views)
HI guys...
 
I just came across this post yestoday and Hopefuly you guys can help me a bit in how to get start with my FTDI and labview.
 
The chip im using im using  FT245R and im trying to use FT245R to acquisite digital data from another sx-28 chip and display the digital waveform graph in LabView.
 
I am quite new to FTDI and Labview, it would be great if anyone of you can supply me a sample vi file to point me the direction.  Thanks A LOT!!
 
Regards
 
KIm
0 Kudos
Message 7 of 13
(4,967 Views)
Hey KIm,
 
You will be using the VISA driver to communicate with your USB device through LV.  There are several tuturials and example codes on our website that you can look at.  If you do a search on Developer Zone for something like "USB VISA" you well get example code, knowledge base articles, and tutorials.  One I think might be good for starting is: http://zone.ni.com/devzone/cda/tut/p/id/4478
There are also some good VISA examples that come with LV once you get your device to show up in Measurement and Automation Explorer.  Just go to help>find examples to search through those.  This should get you off to a good start.  Feel free to post again if you have any more questions.
Scott G.
AE Specialist
National Instruments
0 Kudos
Message 8 of 13
(4,915 Views)
Actually, with the FTDI chip, whether to use VISA or not or whether to use the Driver Development Wizard will depend on how Klm is implementing his device and what driver he uses. FTDI makes two drivers available. One is a VCP or Virtual Com Port. I have a widget with a FTDI chip and use this driver. It appears in MAX as a serial port and I use VISA Reads and Writes. The D2XX driver is a dll and I have some examples of that as well. Here's one that gets the device description. The dll is well documented and is available on FTDI's web site. I have some other examples if needed.
0 Kudos
Message 9 of 13
(4,907 Views)

Hi Dennis

So you used Virtul Com Port instead of dll for your application? I was recommended by my supervisor that i should stick with dll as VCP might not be fast enough.  I can use dll from FTDI to do tasks such as  open, close, get description etc, but not write or read.

Just wondering if it would be possible to have a look your vi file that uses VISA to read and write data? I might just have a go by using VISA.

Thanks a LOT

Regards

Kim

Message Edited by 0401061296 on 09-14-2007 03:57 AM

0 Kudos
Message 10 of 13
(4,867 Views)