LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Unexpected change with 64-bit, Windows 10, LabVIEW 2017, FTDI D2XX and solution

Solved!
Go to solution

A recent upgrade introduced a problem communicating with an FTDI device from 64-bit LabVIEW 2017 on 64-bit Windows 10. If you use FTDI's VIs or have rolled your own wrappers of ftd2xx.dll, you may discover they have stopped working recently. The solution is to identify which parameters are exposed pointers and make sure you're using unsigned 64-bit integers, instead of the unsigned 32-bit integers as used in FTDI's VIs.

 

I don't know if something changed in LabVIEW 2017, Windows 10, or the FTDI drivers. I encountered the problem on a new computer with (new to me) LabVIEW 2017, and a recent update to the FTDI drivers. That's too many changes for me to isolate the cause. Maybe it happened long ago and I just got lucky that all the pointers were in the 32-bit range.

 

I hope this spares someone the frustration I experienced.

Message 1 of 17
(6,042 Views)

What is the upgrade? Something you did, like os or ram upgrade? On a system with 4GB ram, with 2GB used by os, 32 bit would indeed be enough. I'd still expect it to not work properly, but it just might.

 

Instead of making the inputs u64's, a system defined pointer might be more correct.

 

Is Ovak awair of this?

0 Kudos
Message 2 of 17
(6,005 Views)

The computer was changed, but not by me. I hadn't noted the specs on the previous computer, so all I know for sure is Windows changed from 7 to 10 and LabVIEW changed from 2016 to 2017. All versions were 64-bit. That I have more RAM now is my guess too.

 

I think I tried a system defined pointer and it didn't work. I'll have to check.

 

I don't know Ovak.

0 Kudos
Message 3 of 17
(5,994 Views)

auspex wrote:

I don't know Ovak.


I simply googled ftdi LabVIEW and found this. Though they made this driver. If not, does the actual party who made this driver know about this?

0 Kudos
Message 4 of 17
(5,976 Views)

FTDI provides this: http://www.ftdichip.com/Support/SoftwareExamples/CodeExamples/LabVIEW.htm

 

I'd already written my own very similar VIs before I found their library.

0 Kudos
Message 5 of 17
(5,970 Views)

It may seem unexpected but it actually isn't. These VIs were written in LabVIEW 7.0. LabVIEW 2009 for Windows was the first version that was also available as 64 bit version. Earlier versions had no support for 64 bit DLL calls as you can't call 64 bit DLLs from a 32 bit application.

 

In version 2009 LabVIEW also added a new integer datatype size "pointer sized integer" for the Call Library Node. Changing any pointer datatypes to a 64 bit integer in the Call Library Node configuration is not the right fix. You need to change it to pointer sized integer, otherwise the VIs will crash when used in 32 bit LabVIEW.

 

Informing FTDI about that is of course possible, but the fact that they still have a LabVIEW 7.0 library as download doesn't seem to indicated that this is a supported software download but rather an "as is" and "use at your own risk". 

Rolf Kalbermatter
My Blog
Message 6 of 17
(5,959 Views)

Thanks for posting this.

 

I confirm that changing all the handles to U64 is the solution

0 Kudos
Message 7 of 17
(5,718 Views)

Hi,

 

I changed what you suggested, but some how I am still getting FT_INVALID_HANDLE when calling the function ftd2xx. Please if anyone for help highly appreciated. 

However, when I use the software that provided by the usb device provider (LabVIEW without source code) works fine.

 

Thanks,

 

0 Kudos
Message 8 of 17
(5,446 Views)

Show us your code. We can't see your problem.

Rolf Kalbermatter
My Blog
0 Kudos
Message 9 of 17
(5,424 Views)

Thanks rolfk for replying,

I am trying to acquire a spectrum from the spectrum monitoring USB device, I am attaching the code for any help because I tried my best and fail to get things on a track. so any kind of help is highly appreciated.

0 Kudos
Message 10 of 17
(5,417 Views)