02-04-2025 02:06 AM
Attach your VIs! There are a myriad of possible problems. Very possibly related to 32-bit and 64-bit difference or some other mistakes. My magic crystal ball is however out of order so I can't look at the code that you haven't posted.
02-04-2025 01:00 PM
Oh sorry I have not yet been able to get it working. I've attached my VIs. Thank you for your help!
02-05-2025 04:48 AM - edited 02-05-2025 04:50 AM
I did take a quick look at the VIs. They seem to be fine in terms of being called from 64-bit. One thing I noticed is that you have the Calling Convention set to C and not Stdcall. This should make no difference in 64-bit mode since here we really only have Fastcall, and LabVIEW simply ignores the calling convention setting here. However the functions in the 32-bit DLL are defined Stdcall so if you ever plan to use this VIs in 32-bit mode, you'll not only have to change the library name in each but also go through each and change the calling convention.
The error you get from FT4222_SPIMaster_Init() would indicate that the FT4222 library doesn't feel like the device you try to open is 4222 compatible. Are you sure this is a real FT4222 device and not just some FT232 compatible device? Or maybe it is a counterfeit chip?
After FT4222_SPIMaster_Init() returns an error, it is TOTALLY unsafe to call any other FT4222_ function on that handle. Calling other FT4222_ functions should of course check the handle that it is properly initialized for the operation at hand but it may not be able to do so reliably and then tries to access memory locations that haven't been properly initialized because FT4222_SPIMaster_Init() was not successful!
The only thing that you can do with that handle after FT4222_SPIMaster_Init() returned any error, is to use normal FTD2xx functions on it. Your function library for these should check the error status, and create an according error status in the error cluster when the return value does not indicate success. And only FT_Close() and maybe FT4222_Uninitialize() should try to run anyways on an incoming error.
09-19-2025 04:42 AM
Hello,
did get some improvement with implementation the 64bit library FTD2XX64.dll? Is there some solution?
I tried to do same with I2C functionality, but same result. The LibFT4222-64.dll give same status, the device is not supported. The 32bit library works fine with Labview 32bit. But 64bit not and don´t know why. Seems to be, that handl value is wrong or has wrong information.
09-22-2025 08:28 AM
Hello,
Just for info, that could helps somebody, I had wrongly selected FTD2xx.dll library. After a hint from FTDI technical support, I changed the fixed path to FTD2xx64.dll library on my local disc to FTD2xx.dll already loaded by System/LabVIEW and it works. Before the handle value wasn´t accepted by LibFT4222-64.dll, now it is ok. Don´t know, from which location is loaded this FTD2xx.dll file, that works in 64bit LabVIEW, even the name of library is like 32bit FTD library. Strange for me.