Click here to Skip to main content
15,843,727 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi friends!

Now I try to find a code for displaying a text box text into a pole display. I have tried some codes and I have gone through lots of websites, but I couldn't be able to find the way.

First of all I want to know whether is it possible or not? If possible how to do that?

I tried like the below link and the below simple code for the button click.

http://www.merchantsoft.com/technote/Peripherals_and_Hardware/Pole_Displays/USB_Logic_Controls_POle_Displays_-_Win_7.htm

private void button1_Click(object sender, EventArgs e)
{
SerialPort sp = new SerialPort("COM5", 9600, Parity.None, 8, StopBits.One);
sp.Open();
// to clear the display
sp.Write(Convert.ToString((char)12));

// first line goes here
sp.WriteLine("Total : " + textBox1.Text + " RM");

sp.Close();
sp.Dispose();
sp = null;


}


The below error is displaying

The port 'COM5' does not exist.

When I plugged the pole display it hasn't detect under "PORTS (COM & LPT)". It has been detected under "Human Interface Devices"

I have to pass whatever text typed inside the text box to the pole display.

http://www.merchantsoft.com/technote/Peripherals_and_Hardware/Pole_Displays/USB_Logic_Controls_POle_Displays_-_Win_7.htm

I followed the above link to configure the pole display. In this link they are suggest something called Virtual Com Port Driver. I've downloaded a driver from the below link,

http://www.ftdichip.com/Drivers/VCP.htm

I installed the driver, after installation it doesn't prompt for anything.
Can anyone suggest me the way to use the Virtual COM Port Driver


Thanks in advance.
Posted
Updated 5-Jun-13 18:13pm
v2

1 solution

USB ports are only created in Windows when the adapter is plugged in. When the adapter is removed, so is the serial port. There isn't any way around this other than to catch the error and realize that the adapter isn't plugged in.

Also keep in mind that if the user plugs the adapter into a different USB port, the COM port will change, it may also change if they use a different adapter, or they could even change it manually in the device manager, so try not to hard-code your serial port.
 
Share this answer
 
Comments
Krishnananthan Vijayaretnam 5-Jun-13 23:11pm    
Initially I tried to do what you suggest now. But when I plugged the pole display it hasn't detect under "PORTS (COM & LPT)". It has been detected under "Human Interface Devices"

I have to pass whatever text typed inside the text box to the pole display.

http://www.merchantsoft.com/technote/Peripherals_and_Hardware/Pole_Displays/USB_Logic_Controls_POle_Displays_-_Win_7.htm

I followed the above link to configure the pole display. In this link they are suggest something called Virtual Com Port Driver. I've downloaded a driver from the below link,

http://www.ftdichip.com/Drivers/VCP.htm

I installed the driver, after installation it doesn't prompt for anything.
Can anyone suggest me the way to use the Virtual COM Port Driver?

Thanks
SoMad 5-Jun-13 23:46pm    
What Ron is saying is correct. The pole display is the device that has to work with the driver, you cannot force it in you code.
Are you sure you are using the correct driver for your pole display?

You might want to check the links below to see if that can help you get the driver working correctly.
http://windows.microsoft.com/en-us/windows-vista/tips-for-solving-problems-with-usb-devices[^]
http://forums.mydigitallife.info/threads/24666-The-Windows-7-SP1-USB-Driver-Bug-(what-it-is-and-how-to-fix-it)[^]

Soren Madsen
Krishnananthan Vijayaretnam 6-Jun-13 0:49am    
I understood what he said. Drivers are installed properly. The pole display not showing under "PORTS (COM & LPT)" in Device Manager. It has been detected under "Human Interface Devices". If its showing under PORTS (COM & LPT), there is no problem. I have found that the USB Controller showing the pole display's controller(USB Composite Device)

I want to do a usb to com port mapping for the text box text display. That's all. My pole display model is PD *307U-AI. In most of the websites I referred advices to use an adapter. I have to do without an adapter.

Thanks
Krishnananthan Vijayaretnam 10-Jun-13 23:41pm    
I did it without doing any port conversion. I've used Microsoft.PointOfService library for that.
Anyway thanks for your time.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900