Ftdi read in LabVIEW

I am hoping for some assistance with reading data via a USB FTDI device.   I am using the LabVIEW driver to attempt to read back data provided to me via a USB connection to a FTDI FT232HQ on a module connected to an Altera DE2-115 development board.  The FPGA is currently sending packetized data every 1mS.  I simply want to read the data back and parse the contents of the packets and display it in a graph.  During the read in my LabVIEW code (see screen shot included), the data being collected seems to be corrupt or maybe overwritten.  The data seems to repeat and only includes data in the fourth quadrant.  If I open the D2XXtool.exe and run it on the same hardware and data, I can get clean data that represents the data I expect.  I’m wondering what I am doing wrong in my read VI.    The jpg file included here shows my LabVIEW source code and screen shots of my data and the D2XXtool data from a log file.
Solved!
Go to Solution.
Attachments:
FTDI_Read_Problem_LabVIEW.jpg ‏509 KB

If you are intending to use the FTDI chip to read/write an EEPROM I believe you need to use an I2C/EEPROM library (e.g. libmpsse dll?) to do this and not VISA Read/Write (VISA Read/Write does not mean EEPROM Read/Write). VISA Read/Write will just send serial data out of the FTDI cable and not I2C commands to read/write the EEPROM.
Unless the FTDI cable you have does something differently but when we have used FTDI leads to read/write EEPROMs in the past we have had to use an FTDI I2C -> EEPROM library.
Certified LabVIEW Architect, Certified TestStand Developer
NI Days (and A&DF): 2010, 2011, 2013, 2014
NI Week: 2012, 2014
Knowledgeable in all things Giant Tetris and WebSockets

Similar Messages

  • Binary file readed from Labview and Borland C++ v.5

    Hi Everybody!
    My problem is reading binary file from Labview 7.0 and Borland C++ version 5 is not the same.
    Only one difference is "space". Reading from Labview I got "00" (decimal) and reading from Borland C++ I got "32".
    I also try to read this binary file with Matlab 6  and I also got "00" as well as those from Labview.
    I really struck with this problem.. Anybody has an idea about this problem.
    Thanks a lot for anybody help!
    Nok

    Hi,
    These threads regarding reading of binary files was recently discussed in this forum
    You might find some answers for your query
    http://forums.ni.com/ni/board/message?board.id=170&message.id=99016&requireLogin=False
    and
    http://forums.ni.com/ni/board/message?board.id=170&message.id=153565&requireLogin=False
    Regards
    Dev

  • FT232R from FTDI hangs/freeze LabVIEW randomly

    Hi.
    I've been creating a program to display and log humidity and temperature sensors using the FT232R chip from FTDI (http://www.ftdichip.com/)
    To build the DAQ.vi I've used the example 1 from FTDI which can be downloaded here: http://www.ftdichip.com/Support/SoftwareExamples/CodeExamples/LabVIEW.htm
    The DAQ.vi I'm having trouble with is attached here.
    What is happening is that from time to time (could take 10 minutes or could take 10 hours) the program suddenly hangs/freeze, and to solve it I have to diconnect and connect the USB-cable to the FT232R. When I have done so, the program starts working again, but I've lost all the data from the freeze-time.
    Have anyone else experienced this problem using FTDI chips, or have any idea what could be wrong? And is there an easy way to find out if the bug is hardware or software-related?
    I appreaciate the help!
    NB:I know the attached .vi doesn't have wait times between write and read, but I've been having the same problem when using wait times as well.
    Is my avatar the dog from the fraggle rock?
    Solved!
    Go to Solution.
    Attachments:
    DAQ3.vi ‏36 KB

    This sounds like Windows power management shutting off power to the USB HUB but you have any of the common problems in this FAQ article:
    USB Plug-n-Play Devices (Windows)
    Options
    Mark as New
    Bookmark
    Subscribe
    Highlight
    Print
    Email to a Friend
    Report to a Moderator
    ‎01-22-201202:20 PM
    In this topic we will discuss some of the common problems that have been observed using USB devices with LabVIEW on Windows operating systems.  Many of these points are also applicable to other environments but the examples will be use the Windows 7 OS.
    FAQ 1 : My USB device stops working unexpectedly.
    The first thing to look at is the OS power saving options.  There is a global trend towards developing "Green" electronics and energy star ratings are getting fairly common.  "If its not being used shut it off" is nothing new.  Cavemen learned how to bank a fire to preserve energy that would otherwise be wasted.  Likewise, the Windows OS has a power saving feature to shut down power to the USB hubs when no user activity is present.  In Automated systems this feature can cause problems since removing USB hub power will shut down the USB device.   Solution: Use the device manager to change the USB hub Power Options.
    FAQ2: I set the power options and my device connection is still unreliable: Remember, those computer USB ports are often the cheapest that can be mounted on the chassis and share the PC system power supply to supply USB Power. Most uses of USB are temporary connections like a thumb drive or a camera.  These connections do not require high reliability since the user is right there interacting with it.  Power surges and fault tolerance at worst cause the operator to retry the data transfer.  Automated systems require a bit more robustness.  Solutions:
    1) ALWAYS use an external self powered hub.  Perform your engineering due diligence and inspect the devices specifications too- If you can't find them for that device that should clue you to seek an product from a vendor that WILL publish their specs.
    2) High noise environments require the use of ferrites on the USB cable- and don't buy the cheapest cable either! The cheap ones are poorly shielded. 
    3) PROTECT the HUB connections-  If you have a USB2.0 device and Joe User plugs in a 1.0 device in a open slot managed by the same hub- Bingo every port on the hub may back convert to USB1.0.  WORSE there are a lot of damaged or marginally engineered USB devices out there.  Joe User's device may cause power fluctuations when it is inserted or removed from the hub just don't let it happen!
    FAQ3: I am testing USB devices and the OS can't find them anymore.
    This is a Plug-n-Play feature that deserves some exposure.  When you connect a P-n-P device the OS remembers its serial number in a HKEY (Hive-Key) registry entry.  This is helpful when (for example) you want a specific instrument, Say an NI-USB-6008, to show up as a DAQmx Device with VISA Alias "MyDAQ1" every time it is plugged it.  On the other hand, If you want to test a line of USB-Serial converters this can be problematic since the P-n-P driver will mount the first serial number as "COM3" and the next as "COM4" add infinitum until the enumerator controller in the registry and VISA recognized aliases get used up.  Solution: Use the Windows registry API and the Hardware Configuration API in LabVIEW to clear unused VISA Aliases and HKEY entries.   Speak with your staff IT professional about HKEY structure and possible side effects before developing
    Jeff

  • How to use the Control lines of a parallel port as Input lines to be read using Labview ?

    The details are :
    NI Software : LabVIEW
    Version : 5.0
    OS : Windows 95
    NI Hardware : N/A
    Drivers : N/A
    CPU : Pentium
    RAM : 48
    Vendor : darcom
    Customer Information :
    SPEL TESTING
    SPEL, INDIA
    [email protected]
    Ph: (91) 4114 53818
    We do not have any DAQ cards within the PC. We have the parallel port which is EPP and ECP compatible having the address 278h on LPT2 and we are trying use this port for reading 8bit data from an external circuit. We developed a vi program in Labview 5.0 to control the parallel port.We tried with the Data lines to send signals from PC to external device through this parallel port with the addr
    ess 278h (which
    is Data lines) and it works fine. We also tried using reading 4bit data from external
    device to PC through this port with the address 279h (which is Status lines) and it
    is also working fine.
    But it was not possible for us to read through Control lines whose address is 27Ah. Whereas when line printer (dot matrix printer) was
    connected, it was possible for us to take print out. Thus printer was working. This
    informed us that the control lines are all OK!
    Can you please clarify, how to use both control lines and status lines to read 8 bit data through this parallel port using the Labview software.

    There are several Knowledge Base entries about this on the NI site, but probably the most detailed document is on the Advanced Measurements (www.advmeas.com) website. Try looking at this page, I think you will find it useful.
    http://www.advmeas.com/goodies/parallelport.html

  • Read the LabVIEW help file

    Forgive me if this is remarkably simple answer.
    Id like to be able to read LabVIEW help file on my LapTOP which has no LV installed.
    If I can do this from, here as in this forum can it be done?
    Thanks

    Jeff,
    I will work on that.
    What I really was after was the DAQmx VI help.  That gets installed when DAQmx is installed.  I have the VIs (copied from a Windows instrallation). They do not work of course because the core .dll is missing. But that process does not get the help files.
    I did search and found that there are programs available on the Mac which can process .chm files.  I installed two and then downloaded the file you linked. That has the LV help. After some searching in the NI documents pages I found the DAQmx help and the DAQmx VIs help .chm files. Some links tend not to work, but this has given me access to the stuff I wanted.
    For any other crazy Mac users who want to read help files on VIs you cannot run, I have tried CHM Reader, available through the Apple App Store, and iChm, which I found at https://www.macupdate.com/app/mac/28171/ichm . CHM Reader seems to be a bit more robust with the NI files.
    Thanks.
    Lynn

  • Image reading in labview

    Hi I am venkat. I am new to labview. can anyone help me how to read and find its information in labview. thank you.

    Hi eswar,
    ever looked over the functions palette?
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • Can I drive a proximity badge reader with LabVIEW v8.0 ?

    I have a proximity badge reader system in my facility;  the brand name is HID.  I would like to expand the use of those badges to a LabVIEW application on the shop floor.  But, I need to know if LabVIEW can drive a badge reader.
    The proximity reader that I can buy from HID that will work with my existing badges has an RS232 interface.
    Would that work ?
    Thanks.

    If it has an RS-232 interface, you should be able to do it..
    It may simply send an id-tag when it is in proximity..  The proximity simply sends enery to a coil (transformer) which activates the chip to transmit a small RF signal containing the badge id. 

  • RSS feed reader in Labview

    Does anyone have an example of a Labview based RSS feed reader?
    I would like to be able to grab the current weather conditions from the NWB RSS feeds
    Since we are right next to the local airport it would be cheaper than installing our own weather station.
    If not anyone got a good explanation of what an RSS feed is so I could write my own?

    They should be out there somewhere.
    However to get started have a look at my 'getTwitter Status'
    If you install the JKI Easy XML toolkit you will have an example RSS reader in the  Example Finder
    Ton
    Message Edited by TCPlomp on 26-04-2010 10:41 PM
    Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
    Nederlandse LabVIEW user groep www.lvug.nl
    My LabVIEW Ideas
    LabVIEW, programming like it should be!

  • Issue with correct trajectory reading using Labview and Compumotor

    Hi everyone,
    I am having some issues with my compumotor/Labview communication and was wondering if anyone had any advice.
    My setup is a National Instruments PCI-7432 control board linked to a
    UMI-7762 Interface board then I have my driver and motor, the Compumotor
    M83-135 R14, serial 18054. When I use the NI Measurement and Automation Explorer and tell it to go at a velocity, the velocity is no where near the commanded value.
    It is not returning any errors either, I’ll tell it to do say 500 rpm’s and it will take ~2.5 seconds to make a complete revolution. I can get the motor to spin at a very fast rate so it is working, I just was wondering if there was something wrong that would cause it to deviate so far off the assigned velocity.
    I didn't know if I accidentally changed a setting with labview that would cause it not to read the velocity correctly or something like that.
    Thank You
    Keith Kirkwood

    Keith,
        It sounds like one possible issue is that your feedback is not correct.  In which case you'll want to check encoder feedback -- disable your motor in software but leave everything connected.  Then manually turn the motor and check if the 1-D Interactive section in MAX reports the correct steps per one revolution. If not, then check that the encoder setup section is correct, specifically the encoder counts per revolution.
        Also, your motor may need to be tuned, assuming that it hasn't already been tuned.  Is your motor a servo or stepper motor?  From what I could find online it looks like the M83-135 is probably a servo.  Here are a couple links to documents that will help you tune your motor, which often solves velocity issues:
    Understanding Servo Tune
    http://zone.ni.com/devzone/cda/tut/p/id/2923
    And if that seems not to work,
    Unable to Tune a Servo Motor
    http://digital.ni.com/public.nsf/websearch/19668AB2D4997F3D86256E940082F1EF?OpenDocument
    Let me know how it goes, or if you have more questions.  Thank you.
    -Allison S.
    Applications Engineering
    -Allison S.
    Calibration Services
    Product Support Engineer

  • How do you get a digital dial indicator to read in labview?

    I have a digital dial indicator which I uses a USB conection.  the deviece says it is working in MAX but I can not get it to display any numbers in max.  I have also tried to set it up in a VI with a DAQ but the DAQ does not find the device.  Can anyone help?

    Richard @ GE wrote:
    Using hyperterminal I have to press a button on the cable connecting the insturment to the computer for it to record a value. 
    I have not written any code yet for labview.  I have only tried to figure out how to get LabView to see the device but have not been able to acomplish that. 
    By "record a value" I am interpreting this to mean that you are seeing text appear in HyperTerminal. In this case the reason why you are seeing "stuff" in HyperTerminal but not in MAX is that HyperTerminal is continuously running and spitting out whatever is on the serial port. The MAX test panels don't work that way. If you open the Example Finder and look at the Basic Serial Write and Read VI you will see that the read part of that VI checks to see how many bytes are on the serial port and reads that many. If you put this inside a loop then you will get an equivalent to what HyperTerminal does. 

  • Ftdi chip and Labview

    Hello,
    I'm new using Labview and FTDI chips. It's being hard for me to figure out how to start. For example, I have no idea how to program the chip with Labview. Which driver to use: VCom or D2xxx? Should I use normal serial port commands if i use the Vcom driver? Can I use both drivers simultaneously?
    I use Labview 7.0 and I have made a PCB as stated in the sample project:"USB to SPI interface". So i use chip FT2232C in MPSEE mde.
    Does anyone has an example vi that could provide me? It would be a great help for a starting point.
    Regards,
    Pedro
    Ps:Even if is for another chip it would be good !

    Hi Pedro , I have used a similar chip the FT232 , I used the virtual com driver from the FTDI site. This gave me a USB on COM3 ( viewable in MAX ) . I then used the VISA vi's specifying COM3 as the port, you will also need to know the baud rate .
    A useful site if you dont want to do DIY is
    www.i2cchip.com. There i2c to PC adaptor also does SPI
    Hope this helps
    dht

  • Memory Read/Write (LabView)

    I'm trying to do something that is probably simple but I seem to be missing something. I need to read and write to a memory location (such as 0D00:0000) through LabView. I have downloaded accessHW (Port and Memory Utilities for Windows) but it still doesn't seem to work. I checked and the cvirte.dll and accessHW.dll are loaded when I run LabView (6.0). Any clues?

    Try using the read port and write port functions native to LabVIEW. They are under the advanced palette in Port VIs. They are called In Port and Out Port, and read and write to memory locations.
    However...I have not been successful in using these very well, probably because I haven't a clue about writing manually to the memory locations.
    Good luck, and please let everyone know how you do.

  • How to sent the data reading in labview to excel datasheet

    Hi,
    I have aquire the current input from Cb68LP connector block to the labview.Thank a lot
    But I not sure how to sent the data to the excel datasheet(with row and column).
    thank

    Hi.
    You can save your data as "Spreadsheet-File". I my case I aquire digital data.
    the channels are the rows and the pattern are the columns.
    The Spreadsheet-File you can save as .txt then you can open it directly
    in Excel.
    Attachments:
    wf.JPG ‏194 KB

  • Can Excel named ranges be read by LabVIEW?

    Hello everyone,
    I'm creating a LV program that is filling an Excel report with different data – string or number. However, all the cells I'd like to fill feature a named range (one name per cell). Does anybody know if some VI can get the named ranges of a cell and proceed operations on it, such as filling or testing if the range exists? Moreover, I'd rather work with the named range of a cell than its position.
    I'm working on NI DS 2012 SP1.
    Thank you very much for your answer,
    Mika

    Hello Mika,
    all the Settings of MS-Excel could be defined by using "ActiveX". You can find the Cell by Position, and rename the Cell, or u can search the renamed Cell. It is based on the MS-Excel Principle. If u cant do it with the LabVIEW Report OfficeToolkit. First of all, you should find the related Function such as the Function of Range http://msdn.microsoft.com/de-de/library/microsoft.office.interop.excel.range.columns(v=office.11).as... . Then u can do it in LabVIEW with the same Principle, relevant Example could be found in Google(search "Excel via Activex in LabVIEW " for example).
    Hope that helps,
    APD

  • FTDI FT4232HQ automation using labview driver

    Hi,
    I am working on FTDI chip .I want to communicate FTDI chip using labview driver and i have downloaded driver of FT 4232.But i am not able to read and write with that .Can anyone help me out or send me some VI or video ,so that i will be able to communicate.
    Thanx in advance 
    Regards
    Shweta

    Hi Dennis,
    I am using D2xx driver for FTDI.As i want to write and read back data from FTDI FT4232 chip.I hav connected loop back wire between TX and RX buffer of UART port of FT 4232 chip. I m using  FTDI's D2XX drivers to find a device, open it, write data in a byte-array format, read data in a byte-array format and close the device from http://www.ftdichip.com/Support/SoftwareExamples/CodeExamples/LabVIEW.htm example 1.
    My device getting detected ,but i am not geting the read data back.
    Is that example having some error ? or i have to add something else?
    thanks in advance
    Regards
    Shweta18

Maybe you are looking for

  • Cannot delete photos on iPhoto

    Hi there, I have migrated my photos from iMac G5 OS X (10.4.11) to Mac Mini Snow Leopard. Everything went fine, except for the fact that on the Mini I cannot erase / delete any photos. Can anyone tell me why this is the case? Cheers, Xbal

  • Specify the number of rows in Cursor

    Hi, Can anyone tell me, if there is some way where i can specify the number of rows to be fetched in a single cursor. As in, The first fetch 100 rows, second 100 and so on Regards, Rishav

  • Adf input complex arrays error

    I have web service that contains array of complex type as input. I want to invoke web service from jspx page using adf. I have added web service data control and followed this guide [http://www.oracle.com/technetwork/developer-tools/adf/learnmore/54-

  • Why do we need ROCANCEL in datasource?

    why do we need ROCANCEL in datasource? many thanks. brgds/steve

  • 3G Pen detected but not connecting

    Hello Everyone, Today I recieved a 3G Usb PEN and tried to install it and make it work on Arch Linux (It's a Huawei E173s), the pen was detected but there was no connection. I've tried a lot of configuration, but since I don't really know if the apn