LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

ftdi read in LabVIEW

Solved!
Go to solution

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.

Message 1 of 19
(9,247 Views)

Hello,

 

What is the specific LabVIEW Driver and version are you using?

 

Have you tried running the LabVIEW examples found here? Do either of these examples produce the expected data?

 

Regards,

M. Whitaker
ni.com/support
0 Kudos
Message 2 of 19
(9,199 Views)

I'm using LabVIEW 12.01f2.

 

I started with the examples they had, but most were for the virtual com port which I am not using.

0 Kudos
Message 3 of 19
(9,170 Views)
Solution
Accepted by topic author tcarrico

You could try "Get Queue Status" instead of "Get Status".

And you could try "Read Bytes" and use "Byte Array to String"

And you could put a few ms wait inside the while loop that polls for available Bytes.

0 Kudos
Message 4 of 19
(9,164 Views)

Since I was already using Get Queue Status, I left that alone.  However, I did try the Read Bytes VI and used the Byte Array to String and this fixed the problem.  Thanks for the suggestion Todd.  I'm not sure what's wrong with the Read String Data VI, but I was loosing a lot of data when using it.

0 Kudos
Message 5 of 19
(9,150 Views)

Hi,

         I am using UMFT200XD an EV board from FTDI to EEPROM with I2C to USB conversion. I have conected the device and its visible as COM port in the device manager. I need to read the data from EEPROM using the converter via COM port into LabVIEW. I planned using VISA toolkit and made the VI.

 

I can see the deivce being listed in the Port drop down of VISA but couldnt read any data from the device. I am not sure where the problem is exactly whether on the NI MAX VISA device interface or on the FTDI deivce IC FT_PROG. If anyone can suggest me with ideas kindly do it.  

 

Fredrick Johnson JOSEPH

0 Kudos
Message 6 of 19
(8,780 Views)

Hi Fredrickjohnson,

 

Can you confirm for me if you are seeing it in NI MAX?  Are you able to bring up the VISA Test Panel and able to write and read any basic commands?

 

It might be an issue of having the proper set-up - like the baud rate - can you confirm that this is set up properly for your device?

Chris H
Applications Engineer
National Instruments
0 Kudos
Message 7 of 19
(8,731 Views)

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.


LabVIEW Champion, CLA, CLED, CTD
(blog)
0 Kudos
Message 8 of 19
(8,715 Views)

Hi,
          I'm using FTDI IC FT201XB for I2C to USB conversion for reading a EEPROM accessing as a Virtual COM Port. I have programmed the device to enumerate as Virtual COM port and it is visible in the device manager also but I cannot find any kind of read or write operation occurring between my FTDI chip and the EEPROM ( I2C). 

 

I am guessing there might be issues in the configuration settings of VISA VCOMin VISA test panel and I tried by trails using multiple options changing the baud rates, stop bits, flow control etc .. but nothing worked out to my application.

 

The examples provided in the FTDI site is made using the D2XX drivers (.dll files) but whereas my task is to achieve the Read and write operation via VCOM port. 

If anyone worked on it or if with any idea about it; share the steps involved in setting the VISA test panel configuration kindly share it.

 

Fredrick Johnson JOSEPH

0 Kudos
Message 9 of 19
(8,653 Views)

If you read my post above yours, you don't use VISA Read/Write or any VISA settings for reading/writing to an EEPROM using an FTDI cable.

 

You need to configure the FTDI device to NOT use the VCP driver and instead use the D2XX driver.

 

The D2XX driver puts the FTDI device into 'bit-bang' mode which is what is used to send/receive I2C data to program the EEPROM. VISA is used to communicate with serial devices (e.g. an FTDI device as a virtual COM port).

 

 


LabVIEW Champion, CLA, CLED, CTD
(blog)
0 Kudos
Message 10 of 19
(8,649 Views)