06-12-2013 02:20 PM
Hi, I have a problem about the serial communication between LabVIEW and a FTDI chip (UART to USB). I cannot read from this serial port. Even no response when I sent *IDN?\n in MAX.
Here is some other information:
I can detect the port (COM4).
I have installed the driver of FTDI chip.
I have called the DLL file.
I can write and read through another software made by the chip company.
When highlighting the data flow and setting an pin point in the output of “VISA read”, it reads zero bytes. It’s like the data I wrote did not enter into VISA.
Could you give me some advice?
Thanks!
06-12-2013 02:48 PM - edited 06-12-2013 02:48 PM
You're expecting the FTDI chip to respond to *IDN?\n ?
If so, why?
06-12-2013 02:56 PM
Hi,
Maybe I am not sure about the meaning of *IDN?\n . I thought the if I write *IDN?\n, then I will read the information of the chip, such as name, version.
Actually, I wanna read the register of a Maxim chip using UART communication. FTDI chip was used to transfer to USB interface. So I said I wanna read information from FTDI.
Do I make it clear?
Thanks!
06-12-2013 04:00 PM
Forget the *IDN? That is a standard command used by instruments, primarily GPIB, to request the instrument's identification.
I have never heard of a chip responding to that command.
The typical way that the FTDI chip is used is to create a virtual RS-232 port which actually communicates via USB. It appears that that is working for you because you detect COM4.
Now you need to determine the communications protocol used by the Maxim chip. You have not told us what device it is or how it communicates.
Lynn
06-12-2013 04:11 PM
Thank you for answering.
The Maxim chip is 78M6610+PSU, and using UART communication method.
I want to read the information of the registers of Maxim chip. I need to write the address of register first, and then read from other register address. But I read nothing.
Do you have any suggestions?
Thank you:)
06-12-2013 04:18 PM
From the attached picture, my problem is that I can write bytes, while the Bytes Read is zero.
06-12-2013 04:20 PM
This is the picture.
06-13-2013 09:54 AM
A picture of the front panel does not help very much when trying to determine what is not working.
The device data sheet has several pages describing how it communicates via the serial interface. On page 41 it states that the data rate is 38400 baud. Your image shows a different value. Do you have the Serial Interface Selection and Device Address pins set correctly? Are you formatting the command-response bytes correctly? The data sheet does not appear to define the checksum calculation - for example does the checksum include the synchronization header?
Please post your VI so we can see what you have tried.
Lynn
06-13-2013 10:03 AM
Thank you very much. I will read the data sheet again.
BTW, how to set "Device Address pins"? From MAX or the chip itself?
06-13-2013 02:44 PM
Page 39 of the data sheet. Read the Warning box.
Lynn
06-14-2013 02:18 AM
Hi,
I use the FTDI devices a lot. If you want to use it as a serial port just configure it as a COM port and use it as a COM port in LabVIEW.
You don't need any of the FTDI VI's to use it as a COM port.
Kees
06-14-2013 10:23 AM
So I just need to consider the communication between Maxim chip and LabVIEW, thinking nothing about FTDI, right?
BTW, do I need FTDI dll file related to LabVIEW? Or if I can detect COM4, it is enough for FTDI?
Thanks!
06-14-2013 05:43 PM
As long as that chip accepts serial communication, you should be fine using NI VISA to communicate with it. I am not sure what is in the FTDI DLL. Typically, those DLLs expose some configuration functionality or there have lower level drivers that the FTDI accesses when it connects to the computer. LabVIEW does not need the DLL but you may need the DLL for the device to function properly.
Best Regards,
-KP
06-14-2013 05:57 PM
06-17-2013 11:46 AM
Thanks,
What do you mean by "set your string control for hex display"? How to set? By MAX or programming in chip?
I am not quite sure about the pins I was connecting. It was a demo board from other company. It has its own software to display the result from the Maxim chip and it works. My task is to try to read the Maxim chip using LabVIEW, not their own software.
If I cannot read in MAX VISA test panel, can I read the data from any VI?
06-17-2013 12:04 PM - edited 06-17-2013 12:05 PM
jennyzzz wrote:What do you mean by "set your string control for hex display"?
It is a LabVIEW string control/indicator setting. Right-click on the string control/indicator and choose Hex Display.