Solved

Write to COM1 (Serial Port) .Net VB (Studio 2005) - for POLE DISPLAY

Posted on 2007-04-01
3
1,452 Views
Last Modified: 2008-02-01
Hi ! I am a rookie to .Net VB(Studio 2005); in my legacy program I use the basic below to communicate with a serial port that has a POLE display attached to it.

OPEN"COM1:9600,N,8,1" FOR OUTPUT AS #6
     PRINT #6, "Test 1234"
     CLOSE#6

How do I do this with .Net VB ; please provide code and not just a link.

Thanks
BASit
0
Comment
Question by:BASit Bulbulia
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 3

Accepted Solution

by:
r1937 earned 250 total points
ID: 18831780
I have no experience with serial port communication, but try this:

In the toolbox, there is control called "SerialPort".
Add it and from the properties you can set its connection settings:
PortName:"COM1", Baud:"9600", Parity:"None", DataBits:8, StopBits:"ONE".

Default settings may be sufficient.
After that just code in:

        SerialPort1.Open()
        SerialPort1.Write("Test1234")
        SerialPort1.Close()
0
 

Author Comment

by:BASit Bulbulia
ID: 18832381
Thanks, unfortunately although I have COM1: on my PC and a Pole Dispaly connected to it; it will upon SerialPort1.Open() give and exception error (access denied).

Maybe some other expert who worked with COM ports may be able to explain how . .

BASit
0
 

Author Comment

by:BASit Bulbulia
ID: 18952123
Sorry dude;
 
I did not realise that this question was still open . . .

I tries the code with a working com port and it works :-)

Ta


0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
ASP.NET (VB) return a record 2 52
VB.net Open video relating to control 2 30
vb.net Configuration, settings file location? 8 42
vb.net background worker crossthread 11 30
Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question