Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

failure of serial communication

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!

0 Kudos
Message 1 of 16
(4,344 Views)

You're expecting the FTDI chip to respond to *IDN?\n    ?

If so, why?

0 Kudos
Message 2 of 16
(4,339 Views)

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!

0 Kudos
Message 3 of 16
(4,336 Views)

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

0 Kudos
Message 4 of 16
(4,325 Views)

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:)

0 Kudos
Message 5 of 16
(4,322 Views)

From the attached picture, my problem is that I can write bytes, while the Bytes Read is zero.

0 Kudos
Message 6 of 16
(4,321 Views)

This is the picture.Write and Read_FT232R USB UART.png

0 Kudos
Message 7 of 16
(4,320 Views)

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

0 Kudos
Message 8 of 16
(4,293 Views)

Thank you very much. I will read the data sheet again.

 

BTW, how to set "Device Address pins"? From MAX or the chip itself?

0 Kudos
Message 9 of 16
(4,291 Views)

Page 39 of the data sheet.  Read the Warning box.

 

Lynn

0 Kudos
Message 10 of 16
(4,273 Views)

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

 

 

0 Kudos
Message 11 of 16
(1,010 Views)

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!

0 Kudos
Message 12 of 16
(998 Views)

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

Kurt P
Automated Test Software R&D
0 Kudos
Message 13 of 16
(982 Views)
That's correct. As long as the cable shows as a com port, VISA is all that you need. The dll is not required at all.

Please explain what pins you are connecting. Also attach your code. You need to set your string control for hex display.
0 Kudos
Message 14 of 16
(977 Views)

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?

0 Kudos
Message 15 of 16
(956 Views)

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.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 16 of 16
(953 Views)