Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2007-04-01
3
Medium Priority
?
1,508 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 1000 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Article by: jpaulino
XML Literals are a great way to handle XML files and the community doesn’t use it as much as it should.  An XML Literal is like a String (http://msdn.microsoft.com/en-us/library/system.string.aspx) Literal, only instead of starting and ending with w…
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 …
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

610 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