Solved

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

Posted on 2007-04-01
3
1,411 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
  • 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

759 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now