12-19-2011 08:54 AM
I have an USB-CAN device consisting an "FTDI FT245BM" USB-FIFO chip and a "Microchip PIC18F458" microcontroller with CAN module.
I have downloaded the appropriate driver from FTDI (2.08.14 WHQL Certified executable) and installed without problems on Win7 x64.
I have a 3rd party graphical program for testing the device.
I have successfully tested it with the help of an other CAN device, so the HW+SW are able to send and receive CAN signals.
Now I'd like to use this FTDI device under LabView 2011.
For a quick start I downloaded the LabView "Example 1" file LabVIEW_Byte_7.0.zip from FTDI website.
The example VI works well, fhe device leds flashes every time it sends a packet to the bus, and then successfully reads the datas back.
My problem is that the other CAN device receives no signals, and after examinig it with an oscillator we found that de FTDI device sends nothing at all to its output connector.
On the block diagram of the example VI there is a script stating that this example works in a loopback mode.
I tried finding information about controlling the device IO, turning off loopback mode or setting some flags, but I havent found any help yet.
I asked FTDI Support in email, but I havent got any response yet.
Does anyone have an idea about what should I do to use this device under labview?
12-21-2011
10:25 AM
- last edited on
03-12-2024
10:37 AM
by
Content Cleaner
Hi Jazoja,
If I understand your problem correctly, you would like to use NI LabVIEW to program a 3rd party (FTDI) USB chip, to communicate with a 3rd party (Microchip) Microcontroller that implements a CAN bus protocol?
And, you used a 3rd party program to successfully verify, that the issue is in fact in your LabVIEW program, not the device? I am assuming that you verified the full chain:
Windows SW + FTDI USB Drviers + PIC-FTDI HW connection + PIC SW( FTDI and CAN side) + PIC-CAN chipHW connection
All work corectly, except the Windows SW, which you would like to program in LabVIEW?
I am verry happy that you decided to use LabVIEW for developing your application, may I recommend the following NI hardware for USB-CAN communication needs:
NI cDAQ-9171 NI CompactDAQ 1-Slot USB Chassis
NI 9862 1-port high-speed CAN interface
Regarding your current application, I am not sure that I can give you the all the support that you need, but I will try:
I have 2 guesses:
1. The FTDI API has a "simulated device" mode so you can write, test, debugging your software without actual FTDI hardware.
2. The FTDI chip has a debugging feature,
The LabVIEW VIs that you referred to only contain "Call Library Function Node" VI calls. Essentially they call the FTDI API functions from LabVIEW, with appropriate input and output parameters.
Here is a tutorialon how to call DLL functions from LabVIEW:
Regarding What functions to call, I would recommend, that you download and study the FTDI API specification:
Please Let me know if you have further questions regarding National Instruments hardware or software.
Best Regards,
ST
01-04-2012 06:43 AM
In a nutshell:
The device works well with the windows SW, but works only in loopback mode with the LabView VI.
I have had red the FTDI programmers guide before, but there I haven't found anything about loopback or debug mode, however I have found 3 undocumented functions. (eg. FT_IoCtl)
We also put the DLL into LabView, but seems to me it has the same functions.
The LabVIew VI seems to work without the device.
01-04-2012 07:03 AM
ok, I have just found some differences in ft_write input parameters type, examining...
01-05-2012 06:56 AM
The example VI uses the same ftdi dll like the windows sw.
I think it is needless to import the dll, cause the subVIs in the example are built on the same functions and also made better. (eg IO, names, visuals, etc.)