LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using LabVIEW to write to a LCD display using a USB

Yes, you are correct. I have been using the server program and TCP/IP functions to send commands to the LCD. This has been working ok for my application. I would like to, however, be able to communicate through the USB directly so I can send the commands through LabVIEW's VISA vi's, but it would have to show up as a virtual com port. Where would I find the source code for that server program?

0 Kudos
Message 11 of 28
(2,227 Views)
It's right on that page that you provided the link to.
Message 12 of 28
(2,222 Views)

You won't be able to access it through VISA since it is an HID device and not a serial port.  You might have to look at their source code to figure out how to communicate with it as an HID device, as that device class is normally used for keyboards and mice, not LCD screens.  Also, if TCP/IP is working, why change it?  Finally, if you really want to use VISA, you should get an LCD that can run as a serial port (like the CrystalFontz).

 

 

Regards,

Jeremy_B

Applications Engineer
National Instruments
Message 13 of 28
(2,195 Views)

 Smercurio,

 

I have tried to wade through the source code for the server program, but since I am at best an amateur C++ programmer, my attempt was in vain.  However, your other suggestion of using the USART connections to connect to the serial port on the PC may work, as all I really need is to be able to communicate to the LCD through a com port. Do you have any suggestions on how to use the USART to connect to the serial port on my PC? Thank you in advance.

 

Gerardo09

0 Kudos
Message 14 of 28
(2,172 Views)

The reason I need to change the way I am currently communicating to the LCD is because I have encountered a problem when I connect multiple LCD displays. What I am trying to accomplish is writing to roughly 24 LCD screens connected through hubs to a PC.  However, the problem I have encountered is that when I connect multiple LCD displays (14)  some displays are not being recognized through the TCP/IP connection.  I am just receiving a "no device found" message when I open the USBLCDServer.exe for ports 10,010 and above. To add to my prediciment, two different ports have sometimes write to the same LCD! I am thinking that I would have to write a driver for the LCDs, but I have no idea on how to complish that task. Any help, suggestions, or advise is welcome.

 

Thank you,

Gerardo

0 Kudos
Message 15 of 28
(2,169 Views)

Connecting to the USART: page 4 of the Hardware Installation Guide indicates the serial communication pins. There's just RX, TX, and GND. What's not said is whether these are RS-232 compliant, or whether they're "generic" serial. You need to know this in order to be able to connect it to a PC's serial port. Unfortunately, the documentation doesn't say anything about this, so you have to call the manufacturer to determine whether that interface is RS-232 compliant. You would also need to know whether the connection will require a null modem (swapping RX/TX connections). Again, the manufacturer should be able to tell you this.

 

Unable to open ports above 10010: This may be a limitation with the server application. I did not see anything in the documentation regarding this, but given the above, I'm not surprised. Perhaps you may want to ask the manufacturer that question as well.

 

Using VISA directly via USB: As noted earlier, this USB device is using the HID class. This means that you would need to make calls into hid.dll that is used by Windows as the driver for the device, and it appears that this is what the manufacturer is doing with the application they provide. As far as how to use hid.dll, I haven't a clue, but I know it's not trivial. 

Message 16 of 28
(2,153 Views)
Addendum: Note that when I say RS-232 compliant I'm referring to the voltages, as I mentioned in an earlier reply.
0 Kudos
Message 17 of 28
(2,141 Views)

Smercurio,

So, if these pins are not RS-232 compliant, I can make it compliant with a Transducer? Also,if connection does require a null modem (swapping RX/TX connections) would I be able to add one?

 

0 Kudos
Message 18 of 28
(2,133 Views)

Yes, but you may not need to. The RS-232 spec indicates that a logic 1 has to be more negative than -3 Volts, and a logic 0 has to be more positive that 3 Volts. Depending on the supply, the voltage can go up to +/- 15 Volts. You probably can connect the LCD's RX/TX lines directly to a PC, but I recommend contacting the manufacturer first.

 

If the connection requires a null modem you just need to swap the TX and RX connections, which you can do with the cable that will go from the PC to the device. Note that you may need to loopback the handshake lines to prevent the driver from waiting forever for the handshake lines to get to the right state. There's tons of web pages showing you how to do serial connections with devices. Here's one.

0 Kudos
Message 19 of 28
(2,126 Views)

Hi james,

 

I am working with LCD displays from CrystalFontz. it is CFA 632, I just started understanding the communication. if you dont mind can you share your code with me which you developed for 635?

 

thanks,

 

Mudda.

0 Kudos
Message 20 of 28
(2,104 Views)